Skip to content

Commit b218a1a

Browse files
committed
Test Seq.Capture
Rakudo fix: rakudo/rakudo@98e137b1fe
1 parent 15806c4 commit b218a1a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

S32-list/seq.t

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

4-
plan 36;
4+
plan 37;
55

66
my @result = 1,2,3;
77

@@ -143,10 +143,19 @@ is-deeply @searches[0].Array, @expected-searches, 'seq => array works 3';
143143
is $count, 10, '&afterward is called after each call to &body.';
144144
}
145145
146-
147146
# RT#131222
148147
with (1, 2).Seq {
149148
.cache; # Cache the seq
150149
is .perl, (1, 2).Seq.perl,
151150
'.perl on cached Seq does not think it was consumed';
152151
}
152+
153+
subtest 'Seq.Capture' => {
154+
plan 2;
155+
is-deeply (1, 2, <a b c>).Seq.Capture, (1, 2, <a b c>).Capture,
156+
'.Capture returns a Capture of the List of the Seq';
157+
158+
-> ($k, $v) {
159+
is-deeply ($k, $v), (1, 2), 'can unpack a Seq';
160+
}( (1, 2).Seq );
161+
}

0 commit comments

Comments
 (0)