diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-09-08 12:35:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-09-08 12:35:46 +0000 |
commit | 2234743e59ac597da46b3d44c7d8852855750374 (patch) | |
tree | f0b3e1f660484ced9a4a452516c29c2195893139 | |
parent | f0cb210418521d8c2f9524d01cb9e27e0a1fd67f (diff) | |
download | perl-2234743e59ac597da46b3d44c7d8852855750374.tar.gz |
Re-instate all the warnings checks that don't work on Win32, but with
a SKIP that triggers on Win32. (So that they get tested elsewhere)
p4raw-id: //depot/perl@34319
-rw-r--r-- | t/lib/warnings/9uninit | 60 |
1 files changed, 56 insertions, 4 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index fe8cf02002..e0b186a648 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -1417,12 +1417,8 @@ use warnings 'uninitialized'; # ops that can return undef for defined args # split into separate tests to diagnose the cause of daily build smoke # -my $nocmd = '/no/such/command'; # *** `` not tested: Windows produces an error on STDERR # *** ditto qx() -# *** -k not tested: Produces no warning on Windows -my $nan = "NaN"; -# *** ($nan <=> 1) not tested: NaN not supported on Windows # *** pipe() not tested # *** ioctl not tested # *** socket not tested @@ -1445,6 +1441,62 @@ my $nan = "NaN"; EXPECT ######## use warnings 'uninitialized'; +if ($^O eq 'MSWin32') { + print <<'EOM'; +SKIPPED +# `` produces an error on STDERR on Win32 +EOM + exit; +} +my $nocmd = '/no/such/command'; +my $v; +$v = 1 + `$nocmd`; +EXPECT +Use of uninitialized value in addition (+) at - line 11. +######## +use warnings 'uninitialized'; +if ($^O eq 'MSWin32') { + print <<'EOM'; +SKIPPED +# qx produces an error on STDERR on Win32 +EOM + exit; +} +my $nocmd = '/no/such/command'; +my $v; +$v = 1 + qx($nocmd); +EXPECT +Use of uninitialized value in addition (+) at - line 11. +######## +use warnings 'uninitialized'; +my $nan = "NaN"; +if ($nan == $nan) { + print <<'EOM'; +SKIPPED +# NaN not supported here. +EOM + exit; +} +my $v; +$v = 1 + ($nan <=> 1); +EXPECT +Use of uninitialized value in addition (+) at - line 11. +######## +use warnings 'uninitialized'; +if ($^O eq 'MSWin32') { + print <<'EOM'; +SKIPPED +# -k produces no warning on Win32 +EOM + exit; +} +my $nofile = '/no/such/file'; +my $v; +$v = 1 + -k $nofile; +EXPECT +Use of uninitialized value in addition (+) at - line 11. +######## +use warnings 'uninitialized'; my $nofile = '/no/such/file'; my $v; my $f = ""; |