diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-14 00:00:26 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-14 00:00:26 -0800 |
commit | 31b139ba853d7a7a7b30c4c0e7a90020a641854d (patch) | |
tree | aba9b53e83b9e20a05d0ff4a89c8b7666107e1c7 /t/op/filetest.t | |
parent | 21a64c3ee03cc1a361f10224a63c36ef3523d3d8 (diff) | |
download | perl-31b139ba853d7a7a7b30c4c0e7a90020a641854d.tar.gz |
Make -l HANDLE set PL_laststatval with fatal warnings
Fatal warnings were preventing it from being set, because the warning
came first.
(PL_laststatval records the success status of the previous stat.)
Diffstat (limited to 't/op/filetest.t')
-rw-r--r-- | t/op/filetest.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/filetest.t b/t/op/filetest.t index 26d3cddcdf..86ad23546f 100644 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -10,7 +10,7 @@ BEGIN { } use Config; -plan(tests => 44 + 27*14); +plan(tests => 45 + 27*14); ok( -d 'op' ); ok( -f 'TEST' ); @@ -237,6 +237,12 @@ for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") { is $foo[0], "bar", '-l bareword does not corrupt the stack'; } +# -l and fatal warnings +stat "test.pl"; +eval { use warnings FATAL => io; -l cradd }; +ok !stat _, + 'fatal warnings do not prevent -l HANDLE from setting stat status'; + # File test ops should not call get-magic on the topmost SV on the stack if # it belongs to another op. { |