Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use v6;
- use Test;
- plan 12;
- $_ = "here is some foo";
- my $rx1 = "some foo";
- my $rx2 = "(some) foo";
- my regex a {:s (some) foo }
- my regex b {:s $rx1 }
- my regex c {:s $rx2 }
- my regex d {:s {$rx1} }
- my regex e {:s {$rx2} }
- isa-ok $_ ~~ /<a>/, Match;
- isa-ok $_ ~~ /<b>/, Match;
- isa-ok $_ ~~ /<c>/, Match;
- isa-ok $_ ~~ /<d>/, Match;
- isa-ok $_ ~~ /<e>/, Match;
- isa-ok $_ ~~ $rx1, Match;
- isa-ok $_ ~~ $rx2, Match;
- isa-ok $_ ~~ /$rx1/, Match;
- isa-ok $_ ~~ /$rx2/, Match;
- isa-ok $_ ~~ /{$rx1}/, Match;
- isa-ok $_ ~~ /{$rx2}/, Match;
- isa-ok $_ ~~ /:s (some) foo/, Match;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement