X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F15-self.t;h=1491dfe372b294a9f72457e3e173c7f12f858fbe;hb=4e0c022bbcc3cdb56a07f5a4a305808585087d8d;hp=504c4b217bfb46499b8bb0c321d87534df07d47b;hpb=ff3e3f39b252f61a6061d3e3de3f24147bbdd77d;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/t/15-self.t b/t/15-self.t index 504c4b2..1491dfe 100644 --- a/t/15-self.t +++ b/t/15-self.t @@ -5,7 +5,10 @@ use warnings; use Test::More tests => 17; -use Variable::Magic qw/wizard cast dispell getdata getsig/; +use Variable::Magic qw; + +use lib 't/lib'; +use Variable::Magic::TestGlobalDestruction; my $c = 0; @@ -39,7 +42,6 @@ my $c = 0; $w = getdata $wiz, $wiz; is($c, 1, 'getdata on magical self doesn\'t trigger callbacks'); - # is(getsig($w), getsig($wiz), 'getdata returns the correct wizard'); $res = eval { dispell $wiz, $wiz }; is($@, '', 're-dispell on self doesn\'t croak'); @@ -55,8 +57,3 @@ eval q[ BEGIN { require Variable::Magic::TestDestroyRequired; } ]; is $@, '', 'wizard destruction at the end of BEGIN-time require doesn\'t panic'; - -if ((defined $ENV{PERL_DESTRUCT_LEVEL} and $ENV{PERL_DESTRUCT_LEVEL} >= 3) - or eval "use Perl::Destruct::Level level => 3; 1") { - diag 'Test global destruction'; -}