This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/op/blocks.t: add test for RT #2754
authorDan Collins <dcollinsn@gmail.com>
Sun, 3 Jul 2016 22:00:23 +0000 (18:00 -0400)
committerYves Orton <demerphq@gmail.com>
Fri, 21 Oct 2016 07:09:43 +0000 (09:09 +0200)
t/op/blocks.t

index 262ebba..4e1638b 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     set_up_inc('../lib');
 }
 
-plan tests => 7;
+plan tests => 9;
 
 my @expect = qw(
 b1
@@ -145,3 +145,9 @@ expEct
 
 fresh_perl_is('END { print "ok\n" } INIT { bless {} and exit }', "ok\n",
               {}, 'null PL_curcop in newGP');
+
+fresh_perl_is('BEGIN{exit 0}; print "still here"', '', {}, 'RT #2754: BEGIN{exit 0} should exit');
+TODO: {
+    local $TODO = 'RT #2754: CHECK{exit 0} is broken';
+    fresh_perl_is('CHECK{exit 0}; print "still here"', '', {}, 'RT #2754: CHECK{exit 0} should exit');
+}