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