charnames pragma extended with :alias for customized
[p5sagit/p5-mst-13.2.git] / lib / File / Path.t
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(), "foo", "bar");
21     mkpath($path);
22     chmod $perm, "foo", $path;
23
24     print "not " unless -d "foo" && -d $path;
25     print "ok ", ++$count, "\n";
26
27     rmtree("foo");
28     print "not " if -e "foo";
29     print "ok ", ++$count, "\n";
30 }