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