from test/more import *;
let m := "Abc" ~ /(a)(bc)/i;
is( m[2], "bc", "~ works with captures" );
let all := "ab12ab34" ~ /ab([0-9]+)/g;
is( all[0][0], "ab12", "~ /g returns first full match" );
is( all[1][1], "34", "~ /g returns later capture groups" );
is( true ? 1: 2, 1, "?: full ternary works" );
is( 0 ?: 7, 7, "?: short ternary works" );
is( `ok ${ 1 }`, "ok 1", "template interpolation works" );
is( `ok ${ null ?: "test" }`, "ok test", "?: works inside interpolation" );
let x := 1;
die "boom" if false;
is( x, 1, "die supports postfix if and can be skipped" );
done_testing();
