Skip to content

Commit 9acc51a

Browse files
committed
Add test for RT #117481
1 parent eeb03d5 commit 9acc51a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

S02-names-vars/list_array_perl.t

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use v6;
22
use Test;
3-
plan 21;
3+
plan 22;
44

55
# L<S02/Names and Variables/so that Perl can evaluate the result
66
# back to the same object>
@@ -96,6 +96,17 @@ my @tests = (
9696
is_deeply EVAL( $rt65988.perl ), $rt65988, $rt65988.perl ~ '.perl';
9797
}
9898

99+
# probably there is a better place for this test
100+
# RT #117481
101+
{
102+
my %count;
103+
for ('/foo/bar/baz/' ~~ m/^ $<dirname>=(.* '/'+)? $<basename>=(<-[\/]>+) '/'* $ /).gist.lines {
104+
%count{$0}++ if / ^ \s+ (\w+) \s+ '=>' /; ## extract key
105+
};
106+
is (%count<basename>, %count<dirname>), (1, 1),
107+
'no duplicate keys in .gist of Match of regex which backtracked';
108+
}
109+
99110
done;
100111

101112
# vim: ft=perl6

0 commit comments

Comments
 (0)