summaryrefslogtreecommitdiff
path: root/t/op/magic.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/magic.t')
-rwxr-xr-xt/op/magic.t18
1 files changed, 12 insertions, 6 deletions
diff --git a/t/op/magic.t b/t/op/magic.t
index ab23d84cc5..ec7fbb529e 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -24,7 +24,7 @@ $Is_VMS = $^O eq 'VMS';
$Is_Dos = $^O eq 'dos';
$PERL = ($Is_MSWin32 ? '.\perl' : './perl');
-print "1..34\n";
+print "1..35\n";
eval '$ENV{"FOO"} = "hi there";'; # check that ENV is inited inside eval
if ($Is_MSWin32) { ok 1, `cmd /x /c set FOO` eq "FOO=hi there\n"; }
@@ -182,20 +182,26 @@ else {
: (`echo \$NoNeSuCh` eq "foo\n") );
}
+{
+ local $SIG{'__WARN__'} = sub { print "not " };
+ $! = undef;
+ print "ok 31\n";
+}
+
# test case-insignificance of %ENV (these tests must be enabled only
# when perl is compiled with -DENV_IS_CASELESS)
if ($Is_MSWin32) {
%ENV = ();
$ENV{'Foo'} = 'bar';
$ENV{'fOo'} = 'baz';
- ok 31, (scalar(keys(%ENV)) == 1);
- ok 32, exists($ENV{'FOo'});
- ok 33, (delete($ENV{'foO'}) eq 'baz');
- ok 34, (scalar(keys(%ENV)) == 0);
+ ok 32, (scalar(keys(%ENV)) == 1);
+ ok 33, exists($ENV{'FOo'});
+ ok 34, (delete($ENV{'foO'}) eq 'baz');
+ ok 35, (scalar(keys(%ENV)) == 0);
}
else {
- ok "31 # skipped",1;
ok "32 # skipped",1;
ok "33 # skipped",1;
ok "34 # skipped",1;
+ ok "35 # skipped",1;
}