From: Nicholas Clark Date: Mon, 8 Sep 2008 12:35:46 +0000 (+0000) Subject: Re-instate all the warnings checks that don't work on Win32, but with X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2234743e59ac597da46b3d44c7d8852855750374;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index fe8cf02..e0b186a 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 = "";