Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[S04-phasers/in-loop.t] LAST in empty loop
Test for #122011.

See also backlog at http://irclog.perlgeek.de/perl6/2014-06-02#i_8809555
  • Loading branch information
Carl Masak committed Jun 2, 2014
1 parent 4e6880c commit 1bb76a6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S04-phasers/in-loop.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 2;
plan 3;

# TODO, based on synopsis 4:
#
Expand Down Expand Up @@ -71,4 +71,16 @@ plan 2;
'trait blocks work properly in for loop';
}

# RT #122011
{
my $str;

for 10..1 -> $i {
LAST { $str ~= "(this should not happen)" }
}

is $str, "",
'LAST does not fire for empty loop';
}

# vim: ft=perl6

0 comments on commit 1bb76a6

Please sign in to comment.