Created
May 30, 2016 11:48
-
-
Save xdbr/b50968daa9c5f1ba137e50f11fca6ff4 to your computer and use it in GitHub Desktop.
$rx2 fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment