Commit | Line | Data |
a687059c |
1 | #!./perl |
2 | |
79072805 |
3 | # $RCSfile: mkdir.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:06 $ |
a687059c |
4 | |
5 | print "1..7\n"; |
6 | |
1f47e8e2 |
7 | if ($^O eq 'VMS') { # May as well test the library too |
8 | unshift @INC, '../lib'; |
9 | require File::Path; |
10 | File::Path::rmtree('blurfl'); |
11 | } |
12 | else { |
13 | $^O eq 'MSWin32' ? `del /s /q blurfl 2>&1` : `rm -rf blurfl`; |
14 | } |
a687059c |
15 | |
3458556d |
16 | # tests 3 and 7 rather naughtily expect English error messages |
17 | $ENV{'LC_ALL'} = 'C'; |
b598356e |
18 | $ENV{LANGUAGE} = 'C'; # GNU locale extension |
3458556d |
19 | |
79a0689e |
20 | print (mkdir('blurfl',0777) ? "ok 1\n" : "not ok 1\n"); |
21 | print (mkdir('blurfl',0777) ? "not ok 2\n" : "ok 2\n"); |
7a1f88ac |
22 | print ($! =~ /cannot move|exist|denied/ ? "ok 3\n" : "# $!\nnot ok 3\n"); |
a687059c |
23 | print (-d 'blurfl' ? "ok 4\n" : "not ok 4\n"); |
24 | print (rmdir('blurfl') ? "ok 5\n" : "not ok 5\n"); |
25 | print (rmdir('blurfl') ? "not ok 6\n" : "ok 6\n"); |
7a1f88ac |
26 | print ($! =~ /cannot find|such|exist|not found/i ? "ok 7\n" : "# $!\nnot ok 7\n"); |