use v6;
use Test;
plan 11;
if !eval('("a" ~~ /a/)') {
skip_rest "skipped tests - rules support appears to be missing";
exit;
}
ok("A" !~~ m/<.prior>/, 'No prior successful match');
ok("A" ~~ m/<[A..Z]>/, 'Successful match');
ok("ABC" ~~ m/<.prior>/, 'Prior successful match');
ok("B" !~~ m/<.prior>/, 'Prior successful non-match');
ok("C" !~~ m/B/, 'Unsuccessful match');
ok("A" ~~ m/<.prior>/, 'Still prior successful match');
ok("A" ~~ m/<.prior>/, 'And still prior successful match');
ok("BA" ~~ m/B <.prior>/, 'Nested prior successful match');
ok("A" !~~ m/B <.prior>/, 'Nested prior successful non-match');
is ~$/, 'BA', 'matched all we wanted';
ok( 'A' !~~ m/<.prior>/, 'prior target updated');