[perl #37223] [PATCH] File::Find::find fails on Win32 with follow => 1
[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) {
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}