Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

RT #96424, capture from unsuccessful match

  • Loading branch information...
commit b47bf2d857c820cd98cd45afd18b63ebdc470e62 1 parent 2278414
@moritz moritz authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 S05-capture/subrule.t
View
8 S05-capture/subrule.t
@@ -12,7 +12,7 @@ be valid perl6.
=end pod
-plan 34;
+plan 36;
# L<S05/Match objects/When used as a hash>
@@ -79,4 +79,10 @@ is(~$/<caprep>[0], "abcabcabcabc", 'Caprep abc one captured');
is $<alpha>, 'a', 'failed !~~ still makes $<foo> available';
}
+# RT #96424
+{
+ ok '0' ~~ /<alpha>|<digit>/, 'regex matches';
+ is $<alpha>.Str, '', 'Can call methods on captures from unsuccessful matches';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.