X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F17-ctl.t;h=a7557aeb6567ecc6e6497071bf657bf199651c33;hb=135abb4d38a3a9eab3a7e6d6cde33aafd62488c2;hp=7e2e7d8440c4bc3f0e5bbb1313c19d7b04b1ccf5;hpb=bf4c4354fb3bdfdd4d33501318ba3bdd382469c8;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/17-ctl.t b/t/17-ctl.t index 7e2e7d8..a7557ae 100644 --- a/t/17-ctl.t +++ b/t/17-ctl.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 8 + 1; +use Test::More tests => 10 + 1; use Variable::Magic qw/wizard cast/; @@ -79,3 +79,12 @@ use lib 't/lib'; eval "use Variable::Magic::TestScopeEnd"; like $@, qr/turnip/, 'die in BEGIN in require triggers hints hash destructor'; + +eval q{BEGIN { + Variable::Magic::TestScopeEnd::hook { + pass 'in hints hash destructor 2'; + }; + die "tomato"; +}}; + +like $@, qr/tomato/, 'die in BEGIN in eval triggers hints hash destructor';