X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F25-localize-multi.t;fp=t%2F20-localize.t;h=f205e75c9902e5258459d00611384b22be18f237;hb=ba2962546f4b0f74a79f373ad6617643d431da26;hp=35a22c6406e57e5b3e85060a23e63dc67438462e;hpb=cd7bfde845927d38ca43bd7430503f388260d53a;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/20-localize.t b/t/25-localize-multi.t similarity index 66% rename from t/20-localize.t rename to t/25-localize-multi.t index 35a22c6..f205e75 100644 --- a/t/20-localize.t +++ b/t/25-localize-multi.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4 + 10 + 6 + 5 + 6; +use Test::More tests => 10 + 5 + 6; use Scope::Upper qw/localize/; @@ -11,19 +11,6 @@ our $x; sub loc { local $x; my $y = $_[1]; localize '$x', $y, $_[0] + 1 } -$x = 0; -{ - is($x, 0, 'start'); - local $x = 7; - { - local $x = 8; - loc(0, 1); - is($x, 1, 'localized to 1'); - } - is($x, 7, 'no longer localized'); -} -is($x, 0, 'end'); - $x = 0; { is($x, 0, 'start'); @@ -49,27 +36,6 @@ $x = 0; } is($x, 0, 'end'); -$x = 0; -{ - is($x, 0, 'start'); - local $x = 7; - { - local $x = 8; - { - local $x = 9; - { - local $x = 10; - loc(2, 1); - is($x, 10, 'not localized'); - } - is($x, 9, 'not localized'); - } - is($x, 1, 'localized to 1'); - } - is($x, 7, 'no longer localized'); -} -is($x, 0, 'end'); - $x = 0; { is($x, 0, 'start');