Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / perl5 / t / lib / filepath.t
1 #!./perl
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6 }
7
8 use File::Path;
9 use strict;
10
11 my $count = 0;
12 $^W = 1;
13
14 print "1..4\n";
15
16 # first check for stupid permissions second for full, so we clean up
17 # behind ourselves
18 for my $perm (0111,0777) {
19     mkpath("foo/bar");
20     chmod $perm, "foo", "foo/bar";
21
22     print "not " unless -d "foo" && -d "foo/bar";
23     print "ok ", ++$count, "\n";
24
25     rmtree("foo");
26     print "not " if -e "foo";
27     print "ok ", ++$count, "\n";
28 }