Avoid test failure on Linux when STDIN is /dev/null
authorGisle Aas <gisle@aas.no>
Thu, 9 Jul 2009 17:27:12 +0000 (19:27 +0200)
committerGisle Aas <gisle@aas.no>
Thu, 9 Jul 2009 17:27:12 +0000 (19:27 +0200)
sysseek($fh, -1, 0) succeed on Linux when $fh is a handle to /dev/null.
In our build environment the perl test suite runs with STDIN redirected
from /dev/null and without a /dev/tty.  The hope is that the same seek
on a regular file will always fail.

t/lib/warnings/9uninit

index 58db2b2..93c3dec 100644 (file)
@@ -1934,6 +1934,7 @@ Use of uninitialized value in addition (+) at - line 5.
 ########
 use warnings 'uninitialized';
 my $v;
-{ my $x = -1; $v = 1 + sysseek(STDIN, $x, 0); }
+{ my $x = -1; $v = 1 + sysseek(DATA, $x, 0); }
+__END__
 EXPECT
 Use of uninitialized value in addition (+) at - line 3.