Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test for RT #126029.
  • Loading branch information
jnthn committed Sep 19, 2015
1 parent fbd627c commit a1d59e2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion S06-other/main.t
@@ -1,8 +1,11 @@
use v6;

use lib 't/spec/packages';

use Test;
use Test::Util;

plan 6;
plan 7;

## If this test file is fudged, then MAIN never executes because
## the fudge script introduces an C<exit(1)> into the mainline.
Expand All @@ -27,4 +30,11 @@ ok( @*ARGS == 5, '@*ARGS has correct elements');
#?niecza todo
lives-ok { require HasMain }, 'MAIN in a module did not get executed';

# RT #126029
is_run 'sub MAIN() { map { print "ha" }, ^3 }',
{
out => "hahaha",
},
'MAIN return value is sunk';

# vim: ft=perl6

0 comments on commit a1d59e2

Please sign in to comment.