Skip to content

Commit

Permalink
Tests to cover RT #130637.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jan 31, 2017
1 parent 68a5c63 commit bb73a89
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion S05-metasyntax/longest-alternative.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 56;
plan 58;

#L<S05/Unchanged syntactic features/"While the syntax of | does not change">

Expand Down Expand Up @@ -466,4 +466,21 @@ ok "\r\n" ~~ /[";"|"\r\n"]/, '\r\n grapheme in an alternation matches correctly'
#?rakudo todo 'negative lookahead does not LTM properly, RT #122951'
is "abcde" ~~ / ab <![e]> cde | ab.. /, "abcde", 'negative lookahead does LTM properly';

# RT #130637
{
my grammar Foo {
token TOP {
'z' | :i <[0..9]> ** 4
}
}
ok Foo.parse('2603'), 'LTM with :i, <[0..9]>, and repetition works';
}
{
grammar Oops {
token TOP { <?> | 'a' ** 1..2 'b' }
}
ok Oops.parse('ab'),
'LTM with quantifier ** 1..2 followed by something else matches correctly';
}

# vim: ft=perl6 et

0 comments on commit bb73a89

Please sign in to comment.