Skip to content

Commit

Permalink
Add test for GH #3411
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jan 11, 2020
1 parent d44517c commit e76230b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion S04-phasers/enter-leave.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add("packages/Test-Helpers");
use Test::Util;

plan 32;
plan 33;

# L<S04/Phasers/ENTER "at every block entry time">
# L<S04/Phasers/LEAVE "at every block exit time">
Expand Down Expand Up @@ -293,4 +293,16 @@ plan 32;
is $set.elems, 2, 'decont in ENTER works without locals';
}

# https://github.com/rakudo/rakudo/issues/3411
{
my $entered;
class A {
method a() {
ENTER ++$entered;
}
}
A.a;
is $entered, 1, 'Did ENTER only run once';
}

# vim: ft=perl6

0 comments on commit e76230b

Please sign in to comment.