diff options
author | Chip Salzenberg <chip@atlantic.net> | 1997-04-15 00:00:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-15 00:00:00 +1200 |
commit | 037c8c09c49af754e50cc4c5213c0e178ecdd87d (patch) | |
tree | cb6187b33226c9545e651a4ca2ffcad4a7eb92ec /t | |
parent | 5025c45a2e969afb692d1ff0cd507cc26230784b (diff) | |
download | perl-037c8c09c49af754e50cc4c5213c0e178ecdd87d.tar.gz |
Update File::Path
(this is the same change as commit 8a37cc0e712cfd90de4a433c1b9be391b72daf86, but as applied)
Diffstat (limited to 't')
-rwxr-xr-x | t/lib/filepath.t | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/t/lib/filepath.t b/t/lib/filepath.t index c014f741d6..c3bf4a4479 100755 --- a/t/lib/filepath.t +++ b/t/lib/filepath.t @@ -5,16 +5,24 @@ BEGIN { @INC = '../lib'; } -print "1..2\n"; - use File::Path; +use strict; + +my $count = 0; +$^W = 1; -mkpath("foo/bar"); +print "1..4\n"; -print "not " unless -d "foo" && -d "foo/bar"; -print "ok 1\n"; +# first check for stupid permissions second for full, so we clean up +# behind ourselves +for my $perm (0111,0777) { + mkpath("foo/bar"); + chmod $perm, "foo", "foo/bar"; -rmtree("foo"); + print "not " unless -d "foo" && -d "foo/bar"; + print "ok ", ++$count, "\n"; -print "not " if -e "foo"; -print "ok 2\n"; + rmtree("foo"); + print "not " if -e "foo"; + print "ok ", ++$count, "\n"; +} |