Skip to content

Commit

Permalink
Test nested ENTER/LEAVE does not crash
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Jan 30, 2018
1 parent 6c54594 commit 8e4f5ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S04-phasers/enter-leave.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use lib 't/spec/packages';
use Test;
use Test::Util;

plan 30;
plan 31;

# L<S04/Phasers/ENTER "at every block entry time">
# L<S04/Phasers/LEAVE "at every block exit time">
Expand Down Expand Up @@ -270,4 +270,10 @@ plan 30;
exceptions => sub (@ex) { @ex>>.message ~~ <omg wtf> };
}

{ # https://github.com/rakudo/rakudo/issues/1455
my $res;
-> { LEAVE $res := now - ENTER now }();
isa-ok $res, Duration, 'using ENTER inside LEAVE does not crash';
}

# vim: ft=perl6

0 comments on commit 8e4f5ed

Please sign in to comment.