diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-11-22 21:15:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-11-22 21:15:54 +0000 |
commit | b0e6f8646079e4cbee83cdda71aa353762e00e3b (patch) | |
tree | d0d293368e4e8748ab55fe219e0ace5aa3962b5a | |
parent | f15b33d337d48f26112cfef23a2f05290f7ec3ae (diff) | |
download | perl-b0e6f8646079e4cbee83cdda71aa353762e00e3b.tar.gz |
A new test for $^S, based on a patch by Iain 'Spoon' Truskett.
Fix the existing tests that didn't checked the difference
between 0 and undef.
p4raw-id: //depot/perl@18171
-rwxr-xr-x | t/op/magic.t | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/op/magic.t b/t/op/magic.t index beed7f5427..f6958fd5dd 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -36,7 +36,7 @@ sub skip { return 1; } -print "1..47\n"; +print "1..48\n"; $Is_MSWin32 = $^O eq 'MSWin32'; $Is_NetWare = $^O eq 'NetWare'; @@ -308,9 +308,10 @@ open(FOO, "nonesuch"); # Generate ENOENT my %errs = %{"!"}; # Cause Errno.pm to be loaded at run-time ok ${"!"}{ENOENT}; -ok $^S == 0; +ok $^S == 0 && defined $^S; eval { ok $^S == 1 }; -ok $^S == 0; +eval " BEGIN { ok ! defined \$^S } "; +ok $^S == 0 && defined $^S; ok ${^TAINT} == 0; eval { ${^TAINT} = 1 }; |