# 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
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 = "";