Permalink
Browse files

[t/spec] external array aliases in regexes

git-svn-id: http://svn.pugscode.org/pugs@26629 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent a9ca9d7 commit 45a21e4317e76befb3c51aa4d609d4add9494f15 moritz committed May 3, 2009
Showing with 9 additions and 1 deletion.
  1. +9 −1 S05-capture/external-aliasing.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 12;
+plan 16;
# L<S05/External aliasing/>
@@ -27,4 +27,12 @@ is +$/.chunks, 2, 'two chunks';
is $/.chunks.map({.key}).join('|'), 'ident|~', 'right keys of .chunks';
is $/.chunks.map({.value}).join('|'), 'ab| cd ef', 'right values of .chunks';
+{
+ my @a;
+ ok 'abc' ~~ m/@OUTER::a=(.)+/, 'regex with outer array matches';
+ is +@a, 3, 'bound the right number of matches';
+ ok ?(all(@a) ~~ Match), 'All of them are Match objects';
+ is @a.join('|'), 'a|b|c', 'right values';
+}
+
# vim: ft=perl6

0 comments on commit 45a21e4

Please sign in to comment.