Skip to content

Commit

Permalink
Add test for RT #122355
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Oct 21, 2014
1 parent 6db87b2 commit 7050e78
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions S04-phasers/end.t
@@ -1,13 +1,28 @@
use v6;
use Test;

plan 5;
use lib 't/spec/packages';
use Test::Util;

plan 6;

# RT #122355
{
is_run( 'END exit(5)',
{
status => 5 +< 8, ## exit status 5 shifted right by 8 bits
out => '',
err => '',
},
'can use &exit from END block' );
}

eval_lives_ok 'my $x = 3; END { $x * $x }',
'outer lexicals are visible in END { ... } blocks';
'outer lexicals are visible in END { ... } blocks';

# RT #112408
eval_lives_ok 'my %rt112408 = END => "parsing clash with block-less END"',
'Can use END as a bareword hash key (RT 112408)';
'Can use END as a bareword hash key (RT 112408)';

my $a = 0;
#?rakudo 2 todo 'lexicals and EVAL()'
Expand Down

0 comments on commit 7050e78

Please sign in to comment.