Skip to content

Commit

Permalink
Add test for RT #118453
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Oct 22, 2015
1 parent c7e7bde commit 6a07e75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S05-match/capturing-contexts.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use MONKEY-TYPING;
use Test;
use lib 't/spec/packages';
use Test::Util;
plan 51;
plan 52;

# old: L<S05/Return values from matches/"A match always returns a Match object" >
# L<S05/Match objects/"A match always returns a " >
Expand Down Expand Up @@ -199,4 +199,12 @@ plan 51;
is ~$a, '<4', 'result of match assigned to variable matched against works';
}

# RT #118453
{
my $rt118453 = 'pre x post';
$rt118453 ~~ /^ (<-[x]>+) 'x' (\N+) $/;
$rt118453 = ~$0;
is ~$1, ' post', 'Reassigning to matched-against string and then accessing submatches works';
}

# vim: ft=perl6

0 comments on commit 6a07e75

Please sign in to comment.