Commit | Line | Data |
---|---|---|
1a3850a5 | 1 | #!./perl |
2 | ||
3 | BEGIN { | |
4 | chdir 't' if -d 't'; | |
20822f61 | 5 | @INC = '../lib'; |
1a3850a5 | 6 | } |
7 | ||
1a3850a5 | 8 | use File::Path; |
037c8c09 | 9 | use strict; |
10 | ||
11 | my $count = 0; | |
d3a7d8c7 | 12 | use warnings; |
1a3850a5 | 13 | |
037c8c09 | 14 | print "1..4\n"; |
1a3850a5 | 15 | |
037c8c09 | 16 | # first check for stupid permissions second for full, so we clean up |
17 | # behind ourselves | |
18 | for my $perm (0111,0777) { | |
19 | mkpath("foo/bar"); | |
20 | chmod $perm, "foo", "foo/bar"; | |
1a3850a5 | 21 | |
037c8c09 | 22 | print "not " unless -d "foo" && -d "foo/bar"; |
23 | print "ok ", ++$count, "\n"; | |
1a3850a5 | 24 | |
037c8c09 | 25 | rmtree("foo"); |
26 | print "not " if -e "foo"; | |
27 | print "ok ", ++$count, "\n"; | |
28 | } |