Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test for RT#120035.
  • Loading branch information
jnthn committed Jun 2, 2014
1 parent 7272e0e commit 450bd71
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S02-types/lazy-lists.t
Expand Up @@ -15,7 +15,7 @@ use v6;

use Test;

plan 22;
plan 23;


#?pugs emit unless $?PUGS_BACKEND eq "BACKEND_PERL5" {
Expand Down Expand Up @@ -161,4 +161,13 @@ sub make-lazy-list($num) { gather { take $_ for 0..^$num; $was-lazy = 0 } };
is_deeply @b, [(<one two three>).list.item], "unshift: did we not lose the split?";
}

# RT120035
{
my $i;
for gather { $i++, .take for 1..5 } {
last
}
is $i, 1, 'for gather { ... } { last } properly lazy';
}

# vim: ft=perl6

0 comments on commit 450bd71

Please sign in to comment.