Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[S05-mass/rx.t] Test for RT 112454
These are the only tests in this file that use $/, so maybe they should
be somewhere else.
  • Loading branch information
kyleha committed May 14, 2012
1 parent efd9d5b commit cb72ab0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S05-mass/rx.t
@@ -1,6 +1,6 @@
use Test;

plan 728;
plan 732;

### for now
sub matchcheck(*@a) { 1 }
Expand Down Expand Up @@ -2539,6 +2539,19 @@ ok 'baaabbb' ~~ /a**:!2..4/, 'three "a" characters (explicit greed)';
ok 'foooo' ~~ /^ f o ** {$rt112450} $/, 'RT 112450 closure interpolation';
}

# RT 112454
{
my $rt112454 = 3;
my $ten_x = 'x' x 10;

ok $ten_x ~~ / x ** 3 /, 'RT 112454 match sanity';
is $/.Str, 'x' x 3, 'RT 112454 quantifier sanity';

ok $ten_x ~~ / x ** {$rt112454} /, 'Simple match (RT 112454)';
#?rakudo todo 'RT 112454'
is $/.Str, 'x' x $rt112454, '** quantifier with braces (RT 112454)'
}

#### <ident> 2+3 ab2 /mob<ident>: <ab2 @ 4>/ capturing builtin <ident>
#?pugs todo
ok ('2+3 ab2' ~~ /<ident>/) && matchcheck($/, q/mob<ident>: <ab2 @ 4>/), 'capturing builtin <ident>';
Expand Down

0 comments on commit cb72ab0

Please sign in to comment.