From: Graham Knop Date: Wed, 6 Feb 2013 22:41:58 +0000 (-0500) Subject: also make sure DESTROY inside a CLONE isn't GD X-Git-Tag: Devel-GlobalDestruction-0.10~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-GlobalDestruction.git;a=commitdiff_plain;h=efefa5212e5065b8e29440fa4489d2e65678d734 also make sure DESTROY inside a CLONE isn't GD --- diff --git a/t/05_thread_clone.t b/t/05_thread_clone.t index 4596221..5c15ba7 100644 --- a/t/05_thread_clone.t +++ b/t/05_thread_clone.t @@ -49,7 +49,7 @@ BEGIN { use threads; use threads::shared; -print "1..3\n"; +print "1..4\n"; our $had_error :shared; END { $? = $had_error||0 } @@ -66,6 +66,9 @@ use Devel::GlobalDestruction; our $cloner = Test::Thread::Clone->new(sub { ok( ! in_global_destruction(), "CLONE is not GD" ); + my $guard = Test::Scope::Guard->new(sub { + ok( ! in_global_destruction(), "DESTROY during CLONE is not GD"); + }); }); our $global = Test::Scope::Guard->new(sub { ok( in_global_destruction(), "Final cleanup object destruction properly in GD in " . (threads->tid ? 'thread' : 'main program') );