This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
integrate vmsperl contents into mainline
[perl5.git] / t / lib / filepath.t
CommitLineData
1a3850a5
GA
1#!./perl
2
3BEGIN {
4 chdir 't' if -d 't';
93430cb4 5 unshift @INC, '../lib';
1a3850a5
GA
6}
7
1a3850a5 8use File::Path;
037c8c09
CS
9use strict;
10
11my $count = 0;
12$^W = 1;
1a3850a5 13
037c8c09 14print "1..4\n";
1a3850a5 15
037c8c09
CS
16# first check for stupid permissions second for full, so we clean up
17# behind ourselves
18for my $perm (0111,0777) {
19 mkpath("foo/bar");
20 chmod $perm, "foo", "foo/bar";
1a3850a5 21
037c8c09
CS
22 print "not " unless -d "foo" && -d "foo/bar";
23 print "ok ", ++$count, "\n";
1a3850a5 24
037c8c09
CS
25 rmtree("foo");
26 print "not " if -e "foo";
27 print "ok ", ++$count, "\n";
28}