Skip to content

Commit 25cf5a5

Browse files
committed
Add indicator to is_run test's code
That will guarantee the loop in the code actually got run.
1 parent b0c4a7a commit 25cf5a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

S16-io/words.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@ subtest "\$limit arg (IO::Path method)" => { plan 5;
187187

188188
# we spin up another perl6 and do 1500 x 2 .words calls; if the handle
189189
# isn't closed; we can expect some errors to show up in the output
190-
is_run my @words; with ~ $file.perl ~ {
190+
is_run my $i = 0; my @words; with ~ $file.perl ~ {
191191
loop {
192-
last if $++ > 1500;
192+
last if ++$i > 1500;
193193
@words.append: .words;
194-
@words.append: .words(2)
194+
@words.append: .words(2);
195195
}
196-
} ,
197-
{:err(''), :out(''), :0status},
196+
}; print "all ok $i",
197+
{:err(''), :out('all ok 1501'), :0status},
198198
'heuristic for testing whether handle is closed';
199199

200200
{

0 commit comments

Comments
 (0)