Skip to content

Commit

Permalink
Add tests for RT #113950, change fudging (now "todo") for RT #121530
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Nov 23, 2014
1 parent 3d91ae8 commit bba16ae
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions S04-phasers/enter-leave.t
Expand Up @@ -5,7 +5,7 @@ use Test;
use lib 't/spec/packages';
use Test::Util;

plan 23;
plan 25;

# L<S04/Phasers/ENTER "at every block entry time">
# L<S04/Phasers/LEAVE "at every block exit time">
Expand Down Expand Up @@ -179,9 +179,10 @@ plan 23;
is $str, '1', 'die aborts ENTER queue';
}

# RT #121530
#?niecza todo '@!'
#?rakudo.jvm skip 'unwind, RT #121530'
#?rakudo.moar skip 'unwind, RT #121530'
#?rakudo.jvm todo 'unwind, RT #121530'
#?rakudo.moar todo 'unwind, RT #121530'
{
my $str;
try {
Expand Down Expand Up @@ -227,4 +228,24 @@ plan 23;
'LEAVE fires after die in sub' );
}

# RT #113950
{
my $rt113950_last = "hello!";
loop {
last;
LEAVE $rt113950_last ~= " bye!";
}
#?rakudo todo 'RT #113950'
is $rt113950_last, "hello! bye!",
'"last" triggers LEAVE phaser in loop';

my $rt113950_next = "hello!";
for ^3 {
next;
LEAVE $rt113950_next ~= " yay!";
}
is $rt113950_next, "hello! yay! yay! yay!",
'"next" triggers LEAVE phaser in "for" loop';
}

# vim: ft=perl6

0 comments on commit bba16ae

Please sign in to comment.