Skip to content

Commit eed14ff

Browse files
committed
add tests for [Z] and [Z<] on indirect lols
1 parent 311cf9d commit eed14ff

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

S03-metaops/zip.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22

33
use Test;
4-
plan 27;
4+
plan 31;
55

66
ok EVAL('<a b> Z <c d>'), 'zip non-meta operator parses';
77

@@ -87,4 +87,14 @@ is (1, 2 Z, 3, 4).join('|'), '1|3|2|4', 'Z, flattens in list context';
8787
{
8888
eval_dies_ok 'my @a Z= 1,2,3', "zip doesn't handle assignment";
8989
}
90+
91+
{
92+
is [Z](1,2,3;4,5,6;7,8,9), '1 4 7 2 5 8 3 6 9', 'can reduce-zip a direct lol';
93+
is [Z<](1,2,3;4,5,6;7,8,9), 'True True True', 'can reduce-zip-< a direct lol';
94+
95+
my \lol = ((1..*),(4..6),(7..*));
96+
is [Z](|lol), '1 4 7 2 5 8 3 6 9', 'can reduce-zip an indirect lol';
97+
is [Z<](|lol), 'True True True', 'can reduce-zip-< an indirect lol';
98+
}
99+
90100
# vim: ft=perl6

0 commit comments

Comments
 (0)