Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add tests for [Z] and [Z<] on indirect lols
  • Loading branch information
TimToady committed Mar 26, 2015
1 parent 311cf9d commit eed14ff
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S03-metaops/zip.t
@@ -1,7 +1,7 @@
use v6;

use Test;
plan 27;
plan 31;

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

Expand Down Expand Up @@ -87,4 +87,14 @@ is (1, 2 Z, 3, 4).join('|'), '1|3|2|4', 'Z, flattens in list context';
{
eval_dies_ok 'my @a Z= 1,2,3', "zip doesn't handle assignment";
}

{
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';
is [Z<](1,2,3;4,5,6;7,8,9), 'True True True', 'can reduce-zip-< a direct lol';

my \lol = ((1..*),(4..6),(7..*));
is [Z](|lol), '1 4 7 2 5 8 3 6 9', 'can reduce-zip an indirect lol';
is [Z<](|lol), 'True True True', 'can reduce-zip-< an indirect lol';
}

# vim: ft=perl6

0 comments on commit eed14ff

Please sign in to comment.