From: Vincent Pit Date: Tue, 13 Sep 2011 21:32:59 +0000 (+0200) Subject: Fix a test in t/60-uplevel-target.t that does not test anything X-Git-Tag: v0.17~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=65830be3a9a639367f235c7fe5bfd16ee7e5e176;p=perl%2Fmodules%2FScope-Upper.git Fix a test in t/60-uplevel-target.t that does not test anything --- diff --git a/t/60-uplevel-target.t b/t/60-uplevel-target.t index 1dcf325..c605299 100644 --- a/t/60-uplevel-target.t +++ b/t/60-uplevel-target.t @@ -226,7 +226,9 @@ sub four { is $destroyed, 1, "$desc: target is detroyed"; } - { + SKIP: { + skip 'This fails even with a plain subroutine call on 5.8.x' => 6 + if "$]" < 5.009; local $@; local $destroyed = 0; my $desc = 'code destruction'; @@ -237,6 +239,7 @@ sub four { ++$lexical; is $destroyed, 0, "$desc: not yet 1"; }; + $code = bless $code, 'Scope::Upper::TestCodeDestruction'; eval { sub { @@ -251,7 +254,7 @@ sub four { is $destroyed, 0, "$desc: not yet 3"; }; - is $destroyed, 0, "$desc: code is destroyed"; + is $destroyed, 1, "$desc: code is destroyed"; } SKIP: {