From: Rafael Garcia-Suarez Date: Fri, 22 Nov 2002 21:15:54 +0000 (+0000) Subject: A new test for $^S, based on a patch by Iain 'Spoon' Truskett. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0e6f8646079e4cbee83cdda71aa353762e00e3b;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/op/magic.t b/t/op/magic.t index beed7f5..f6958fd 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 };