Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
don't rely on .perl in pair.t
  • Loading branch information
moritz committed Aug 22, 2015
1 parent 78cff17 commit 9431004
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S02-types/pair.t
Expand Up @@ -338,7 +338,8 @@ Note, "non-chaining binary" was later renamed to "structural infix".
isa-ok (a => [3,4]).invert[0].key, Int, 'Pair.invert.key type';
is (a => [3,4]).invert».value, 'a a', 'Pair.invert splits positional values and dups keys';

is <a b c>.pairs.invert.perl, '(:a(0), :b(1), :c(2))', 'list of array pairs can be inverted';
is ~<a b c>.pairs.invert.map({ .key ~ '|' ~ .value}),
'a|0 b|1 c|2', 'list of array pairs can be inverted';
is { a => (1,2), b => <x y z> }.pairs.invert.sort.gist, '1 => a 2 => a x => b y => b z => b', 'list of hash pairs can be inverted';
}

Expand Down

0 comments on commit 9431004

Please sign in to comment.