We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a5a13 commit cfc0897Copy full SHA for cfc0897
S05-metasyntax/longest-alternative.t
@@ -1,7 +1,7 @@
1
use v6;
2
use Test;
3
4
-plan 48;
+plan 50;
5
6
#L<S05/Unchanged syntactic features/"While the syntax of | does not change">
7
@@ -437,4 +437,15 @@ my $str = 'a' x 7;
437
is ~$/, 'äaÄAÁ', 'got longest alternative with :i:m';
438
}
439
440
+# RT #113884
441
+{
442
+ #?rakudo todo "RT #113884 - constant variables not counted in LTM yet"
443
+ constant $x = 'ab';
444
+ is ~('ab' ~~ / a | b | $x /), 'ab', 'got longest alternative with constant';
445
+
446
+ my $y = 'ab';
447
+ is ~('ab' ~~ / a | b | $y /), 'a', "non constants don't count toward LTM";
448
+}
449
450
451
# vim: ft=perl6 et
0 commit comments