Skip to content

Commit 854a53b

Browse files
committed
Tests for RT #131865
1 parent 342bff1 commit 854a53b

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

S07-hyperrace/hyper.t

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

4-
plan 40;
4+
plan 41;
55

66
{
77
my @result = <a b c d e f g>.hyper.map({ $_.uc });
@@ -153,3 +153,12 @@ dies-ok { sink (1..1000).hyper.grep: { die } },
153153
is (^10).hyper.map(&f).list, (0, 1, 4, 9, 16, 25, 36, 49, 64, 81),
154154
"hyper map with a multi sub works";
155155
}
156+
157+
# RT #131865
158+
{
159+
my atomicint $got = 0;
160+
for <a b c>.hyper {
161+
$got++
162+
}
163+
is $got, 3, 'for <a b c>.hyper { } actually iterates';
164+
}

S07-hyperrace/race.t

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

4-
plan 29;
4+
plan 30;
55

66
{
77
my @result = <a b c d e f g>.race.map({ $_.uc });
@@ -132,3 +132,12 @@ dies-ok { sink (1..1000).race.grep: { die } },
132132
is (^10).race.map(&f).list.sort, (0, 1, 4, 9, 16, 25, 36, 49, 64, 81),
133133
"race map with a multi sub works";
134134
}
135+
136+
# RT #131865
137+
{
138+
my atomicint $got = 0;
139+
for <a b c>.race {
140+
$got++
141+
}
142+
is $got, 3, 'for <a b c>.race { } actually iterates';
143+
}

0 commit comments

Comments
 (0)