Actually submit previous change.
[p5sagit/p5-mst-13.2.git] / t / lib / warnings / pp_sys
index d84ff75..173d0d8 100644 (file)
@@ -452,8 +452,37 @@ getc() on closed filehandle FH2 at - line 12.
 # pp_sys.c [pp_sselect]
 use warnings 'misc';
 $x = 1;
-select $x, undef, undef, undef;
+select $x, undef, undef, 1;
 no warnings 'misc';
-select $x, undef, undef, undef;
+select $x, undef, undef, 1;
 EXPECT
 Non-string passed as bitmask at - line 4.
+########
+use Config;
+BEGIN {
+    if (!$Config{d_fchdir}) {
+       print <<EOM;
+SKIPPED
+# fchdir not present
+EOM
+       exit;
+    }
+}
+opendir FOO, '.'; closedir FOO;
+open BAR, '.'; close BAR;
+opendir $dh, '.'; closedir $dh;
+open $fh, '.'; close $fh;
+chdir FOO;
+chdir BAR;
+chdir $dh;
+chdir $fh;
+use warnings qw(unopened closed) ;
+chdir FOO;
+chdir BAR;
+chdir $dh;
+chdir $fh;
+EXPECT
+chdir() on unopened filehandle FOO at - line 20.
+chdir() on closed filehandle BAR at - line 21.
+chdir() on unopened filehandle $dh at - line 22.
+chdir() on closed filehandle $fh at - line 23.