Skip to content

Commit c12f159

Browse files
authored
Merge pull request #382 from taboege/rotor-whatever
Add tests for List.rotor with Whatever and Inf
2 parents 910f2df + fa3dea7 commit c12f159

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

S32-list/rotor.t

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

4-
plan 16;
4+
plan 18;
55

66
#?DOES 1
77
sub r(\pos, $expected, $descr? is copy, *%named) {
@@ -74,3 +74,11 @@ subtest '.rotor: 2 => -1, :partial obeys Iterator protocol' => {
7474
'got right result';
7575
is $iterends, 1, 'stopped pulling after receiving IterationEnd';
7676
}
77+
78+
is-deeply <a b c d e f g h>.rotor((1,2,3,*)),
79+
(("a",), ("b", "c",), ("d", "e", "f",), ("g", "h",)),
80+
'.rotor with Whatever consumes everything';
81+
82+
is-deeply <a b c d e f g h>.rotor((1,2,3,Inf)),
83+
(("a",), ("b", "c",), ("d", "e", "f",), ("g", "h",)),
84+
'.rotor with Inf consumes everything';

0 commit comments

Comments
 (0)