Skip to content

Commit

Permalink
Tests for RT #72440.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 30, 2015
1 parent 73cd22a commit 4752d6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion S05-metachars/tilde.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 27;
plan 29;

# L<S05/New metacharacters/"The ~ operator is a helper for matching
# nested subrules with a specific terminator">
Expand Down Expand Up @@ -74,4 +74,8 @@ ok 'x(ab' !~~ m/<&t1>/, '~ and constant atoms (missing closing bracket)';
is ($0,$1), ("c","b"), "~ operator in regexp does not revert capture order";
}

# RT #72440
ok "(f)oo" ~~ /^ \( ~ \) foo $/, 'Only take single atom after goal (1)';
nok "(fo)o" ~~ /^ \( ~ \) foo $/, 'Only take single atom after goal (2)';

# vim: ft=perl6
6 changes: 5 additions & 1 deletion S05-metasyntax/repeat.t
Expand Up @@ -14,7 +14,7 @@ be valid perl6.

# Note: single-quotes.t tests repetition on single quoted items in regexes.

plan 27;
plan 29;

# L<S05/Bracket rationalization/The general repetition specifier is now>

Expand Down Expand Up @@ -75,4 +75,8 @@ ok ('a b,c,d' ~~ token { \w \s \w+ % \, }), 'can combine % with backslash charac
'adequate error message when backtrack control is out of control';
}

# RT #72440
ok '1a2a3bc' ~~ /^ \d+ % abc $/, '% only takes single atom as separator';
nok '1ab2ab3c' ~~ /^ \d+ % abc $/, '% only takes single atom as separator';

# vim: ft=perl6

0 comments on commit 4752d6b

Please sign in to comment.