Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add tests for RT #113884
  • Loading branch information
coke committed Jul 10, 2015
1 parent 48a5a13 commit cfc0897
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S05-metasyntax/longest-alternative.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 48;
plan 50;

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

Expand Down Expand Up @@ -437,4 +437,15 @@ my $str = 'a' x 7;
is ~$/, 'äaÄAÁ', 'got longest alternative with :i:m';
}

# RT #113884
{
#?rakudo todo "RT #113884 - constant variables not counted in LTM yet"
constant $x = 'ab';
is ~('ab' ~~ / a | b | $x /), 'ab', 'got longest alternative with constant';

my $y = 'ab';
is ~('ab' ~~ / a | b | $y /), 'a', "non constants don't count toward LTM";
}


# vim: ft=perl6 et

0 comments on commit cfc0897

Please sign in to comment.