Skip to content

Commit ae74454

Browse files
committed
Test list(Seq)/Seq.list gives lists
1 parent 626c4bd commit ae74454

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

S03-sequence/basic.t

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use Test;
33

44
# L<S03/List infix precedence/"the sequence operator">
55

6-
plan 143;
6+
plan 144;
77

88
# single-term sequence
99

@@ -279,4 +279,16 @@ is (1 …^ 10), 1..^10, 'Unicode ellipsis works excluding final value';
279279
ok !('a' ... 'z').is-lazy, "Final 'z' is not lazy";
280280
ok !({rand} ... * > .5).is-lazy, "Final condition is not lazy";
281281
}
282+
283+
subtest 'list of Seq is List' => {
284+
plan 4;
285+
286+
my $lmeth := (1, 2, 3).Seq.list;
287+
isa-ok $lmeth, List, 'got List from .list';
288+
is-deeply $lmeth, (1, 2, 3), 'correct contents from .list';
289+
290+
my $lsub := list (1, 2, 3).Seq;
291+
isa-ok $lsub, List, 'got List from &list';
292+
is-deeply $lsub, (1, 2, 3), 'correct contents from &list';
293+
}
282294
# vim: ft=perl6

0 commit comments

Comments
 (0)