diff options
author | Craig A. Berry <craigberry@mac.com> | 2004-11-20 04:29:47 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-11-23 09:09:57 +0000 |
commit | c162e49af577414c7863a0dd3de0ccb3daf6d69d (patch) | |
tree | 386a8fb799e8517aea743f75fb7765b7ead9d121 /t | |
parent | 30e302f80e1dae1c92a646f938e88ba8e186469a (diff) | |
download | perl-c162e49af577414c7863a0dd3de0ccb3daf6d69d.tar.gz |
warnings.t portability tweaks
From: "Craig A. Berry" <craigberry@mac.com>
Message-ID: <419F70FB.7000100@mac.com>
p4raw-id: //depot/perl@23525
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/9uninit | 35 | ||||
-rw-r--r-- | t/lib/warnings/perlio | 2 |
2 files changed, 27 insertions, 10 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 4a3b3a3568..d22e4cf0e6 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -1166,7 +1166,6 @@ eval { syswrite $m1, $g1 }; # eval { syswrite STDERR, $m1 }; # XXX under utf8, can give # eval { syswrite STDERR, $m1, $g1 }; # XXX different warnings # eval { syswrite STDERR, $m1, $g1, $m2 }; -eval { my $x; flock $x, $g1 }; eval { my $x; socket $x, $m1, $g1, $m2 }; eval { my ($x,$y); socketpair $x, $y, $m1, $g1, $m2 }; EXPECT @@ -1178,14 +1177,32 @@ Use of uninitialized value $g1 in sysseek at - line 6. Use of uninitialized value $m1 in sysseek at - line 6. Use of uninitialized value $m1 in ref-to-glob cast at - line 7. Use of uninitialized value $g1 in syswrite at - line 7. -Use of uninitialized value $x in ref-to-glob cast at - line 11. -Use of uninitialized value $g1 in flock at - line 11. -Use of uninitialized value $m2 in socket at - line 12. -Use of uninitialized value $g1 in socket at - line 12. -Use of uninitialized value $m1 in socket at - line 12. -Use of uninitialized value $m2 in socketpair at - line 13. -Use of uninitialized value $g1 in socketpair at - line 13. -Use of uninitialized value $m1 in socketpair at - line 13. +Use of uninitialized value $m2 in socket at - line 11. +Use of uninitialized value $g1 in socket at - line 11. +Use of uninitialized value $m1 in socket at - line 11. +Use of uninitialized value $m2 in socketpair at - line 12. +Use of uninitialized value $g1 in socketpair at - line 12. +Use of uninitialized value $m1 in socketpair at - line 12. +######## +use Config; +BEGIN { + if ( !$Config{d_flock} && + !$Config{d_fcntl_can_lock} && + !$Config{d_lockf} ) { + print <<EOM ; +SKIPPED +# flock not present +EOM + exit ; + } +} +use warnings 'uninitialized'; +our ($g1); + +eval { my $x; flock $x, $g1 }; +EXPECT +Use of uninitialized value $x in ref-to-glob cast at - line 16. +Use of uninitialized value $g1 in flock at - line 16. ######## use warnings 'uninitialized'; my ($m1, $v); diff --git a/t/lib/warnings/perlio b/t/lib/warnings/perlio index e84e3de606..0ccc5a884f 100644 --- a/t/lib/warnings/perlio +++ b/t/lib/warnings/perlio @@ -44,7 +44,7 @@ EXPECT Argument list not closed for PerlIO layer "aa(" at - line 6. ######## ---FILE-- PerlIO/xyz.pm +--FILE-- PerlIO_test_dir/xyz.pm 1; --FILE-- # perlio [PerlIO_parse_layers] |