From: Gisle Aas Date: Thu, 9 Jul 2009 17:27:12 +0000 (+0200) Subject: Avoid test failure on Linux when STDIN is /dev/null X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d6e9c138f96185492e3fdf6a460594feb4fee57;p=p5sagit%2Fp5-mst-13.2.git Avoid test failure on Linux when STDIN is /dev/null 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. --- diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 58db2b2..93c3dec 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -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.