diff options
author | Peter Dintelmann <Peter.Dintelmann@Dresdner-Bank.com> | 2006-02-07 17:33:54 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-02-08 13:15:51 +0000 |
commit | 4dc171f099f09ddce664c46adaa55908b398396f (patch) | |
tree | 7afca85c1566bfb3f4d59a501b26af06d3a54aab /t | |
parent | 294a48e93682c45d53fd3e8adb7bbdd7068cbb1d (diff) | |
download | perl-4dc171f099f09ddce664c46adaa55908b398396f.tar.gz |
[perl #38464] chdir() on closed handles
From: Peter Dintelmann (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.0.11-38464-129771.3.46114092925276@perl.org>
Plus a regression test.
p4raw-id: //depot/perl@27130
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/pp_sys | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys index d84ff75fea..4149117618 100644 --- a/t/lib/warnings/pp_sys +++ b/t/lib/warnings/pp_sys @@ -457,3 +457,22 @@ no warnings 'misc'; select $x, undef, undef, undef; EXPECT Non-string passed as bitmask at - line 4. +######## +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 10. +chdir() on closed filehandle BAR at - line 11. +chdir() on unopened filehandle $dh at - line 12. +chdir() on closed filehandle $fh at - line 13. |