summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-03-04 02:00:15 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-03-04 02:00:15 +0000
commit2bb40b7f9f696f78f932ef8d368a2b2dea2c0bbb (patch)
tree733536530b2a5fa4f8f51acaead1f46e6eb82ac8 /t
parent2862e1b7fc64694815faab42fc50219a12dae9f0 (diff)
downloadperl-2bb40b7f9f696f78f932ef8d368a2b2dea2c0bbb.tar.gz
[win32] renumber some tests to match maint branch
p4raw-id: //depot/win32/perl@725
Diffstat (limited to 't')
-rwxr-xr-xt/op/local.t54
1 files changed, 26 insertions, 28 deletions
diff --git a/t/op/local.t b/t/op/local.t
index 1a8daac138..0df1b6d1dc 100755
--- a/t/op/local.t
+++ b/t/op/local.t
@@ -53,53 +53,51 @@ print +($@ =~ /Can't localize through a reference/) ? "" : "not ", "ok 22\n";
eval 'local(%$e)';
print +($@ =~ /Can't localize through a reference/) ? "" : "not ", "ok 23\n";
-# check for scope leakage
-
-$a = 'outer';
-if (1) { local $a = 'inner' }
-print +($a eq 'outer') ? "" : "not ", "ok 24\n";
-
-# see if localization works when scope unwinds
-
-local $m = 5;
-eval {
- for $m (6) {
- local $m = 7;
- die "bye";
- }
-};
-print $m == 5 ? "" : "not ", "ok 25\n";
-
# Array and hash elements
@a = ('a', 'b', 'c');
{
local($a[1]) = 'foo';
local($a[2]) = $a[2];
- print +($a[1] eq 'foo') ? "" : "not ", "ok 26\n";
- print +($a[2] eq 'c') ? "" : "not ", "ok 27\n";
+ print +($a[1] eq 'foo') ? "" : "not ", "ok 24\n";
+ print +($a[2] eq 'c') ? "" : "not ", "ok 25\n";
undef @a;
}
-print +($a[1] eq 'b') ? "" : "not ", "ok 28\n";
-print +($a[2] eq 'c') ? "" : "not ", "ok 29\n";
-print +(!defined $a[0]) ? "" : "not ", "ok 30\n";
+print +($a[1] eq 'b') ? "" : "not ", "ok 26\n";
+print +($a[2] eq 'c') ? "" : "not ", "ok 27\n";
+print +(!defined $a[0]) ? "" : "not ", "ok 28\n";
@a = ('a', 'b', 'c');
{
local($a[1]) = "X";
shift @a;
}
-print +($a[0].$a[1] eq "Xb") ? "" : "not ", "ok 31\n";
+print +($a[0].$a[1] eq "Xb") ? "" : "not ", "ok 29\n";
%h = ('a' => 1, 'b' => 2, 'c' => 3);
{
local($h{'a'}) = 'foo';
local($h{'b'}) = $h{'b'};
- print +($h{'a'} eq 'foo') ? "" : "not ", "ok 32\n";
- print +($h{'b'} == 2) ? "" : "not ", "ok 33\n";
+ print +($h{'a'} eq 'foo') ? "" : "not ", "ok 30\n";
+ print +($h{'b'} == 2) ? "" : "not ", "ok 31\n";
local($h{'c'});
delete $h{'c'};
}
-print +($h{'a'} == 1) ? "" : "not ", "ok 34\n";
-print +($h{'b'} == 2) ? "" : "not ", "ok 35\n";
-print +($h{'c'} == 3) ? "" : "not ", "ok 36\n";
+print +($h{'a'} == 1) ? "" : "not ", "ok 32\n";
+print +($h{'b'} == 2) ? "" : "not ", "ok 33\n";
+print +($h{'c'} == 3) ? "" : "not ", "ok 34\n";
+
+# check for scope leakage
+$a = 'outer';
+if (1) { local $a = 'inner' }
+print +($a eq 'outer') ? "" : "not ", "ok 35\n";
+
+# see if localization works when scope unwinds
+local $m = 5;
+eval {
+ for $m (6) {
+ local $m = 7;
+ die "bye";
+ }
+};
+print $m == 5 ? "" : "not ", "ok 36\n";