Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / perl5 / t / op / mkdir.t
1 #!./perl
2
3 # $RCSfile: mkdir.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:06 $
4
5 print "1..7\n";
6
7 $^O eq 'MSWin32' ? `del /s /q blurfl 2>&1` : `rm -rf blurfl`;
8
9 # tests 3 and 7 rather naughtily expect English error messages
10 $ENV{'LC_ALL'} = 'C';
11
12 print (mkdir('blurfl',0777) ? "ok 1\n" : "not ok 1\n");
13 print (mkdir('blurfl',0777) ? "not ok 2\n" : "ok 2\n");
14 print ($! =~ /exist|denied/ ? "ok 3\n" : "# $!\nnot ok 3\n");
15 print (-d 'blurfl' ? "ok 4\n" : "not ok 4\n");
16 print (rmdir('blurfl') ? "ok 5\n" : "not ok 5\n");
17 print (rmdir('blurfl') ? "not ok 6\n" : "ok 6\n");
18 print ($! =~ /such|exist|not found/i ? "ok 7\n" : "not ok 7\n");