Skip to content

Commit 7b838ea

Browse files
committed
Test for RT #130081.
1 parent 6a40128 commit 7b838ea

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

S05-grammar/parse_and_parsefile.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 16;
4+
plan 17;
55

66
# tests .parse and .parsefile methods on a grammar
77

@@ -81,4 +81,10 @@ throws-like '::No::Such::Grammar.parse()', Exception, '.parse on missing grammar
8181
is RT111768.parse("aaaa;", :rule<e>).ast, ';;;;a', "Recursive .ast calls work";
8282
}
8383

84+
# RT #130081
85+
{
86+
my grammar G { regex TOP { ‘a’ || ‘abc’ } };
87+
is G.parse(abc), 'abc', 'A regex TOP will be backtracked into to get a long enough match';
88+
}
89+
8490
# vim: ft=perl6 expandtab sw=4

0 commit comments

Comments
 (0)