X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F06_load-in-gd.t;h=574c29dfdf59054859668bce8515592113f761b7;hb=e029c65666417046fefe06ad3caf04f489fe31d1;hp=f51c4015d3165a2cbddb81557e886efe5c66f82d;hpb=350bef653f634d1c7cb7357b45e1835b1489f9b7;p=p5sagit%2FDevel-GlobalDestruction.git diff --git a/t/06_load-in-gd.t b/t/06_load-in-gd.t index f51c401..574c29d 100644 --- a/t/06_load-in-gd.t +++ b/t/06_load-in-gd.t @@ -15,12 +15,19 @@ BEGIN { sub DESTROY { my $self = shift; $self->[0]->() } } -print "1..1\n"; +use POSIX qw(_exit); + +$|++; +print "1..3\n"; our $alive = Test::Scope::Guard->new(sub { require Devel::GlobalDestruction; my $gd = Devel::GlobalDestruction::in_global_destruction(); - print(($gd ? '' : 'not ') . "ok 1 - global destruct detected when loaded during GD\n"); - exit($gd ? 0 : 1); + print(($gd ? '' : 'not ') . "ok 3 - global destruct detected when loaded during GD\n"); + _exit($gd ? 0 : 1); }); +print(($alive ? '' : 'not ') . "ok 1 - alive during runtime\n"); +END { + print(($alive ? '' : 'not ') . "ok 2 - alive during END\n"); +}