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