This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test case for C<undef %File::Glob::>
[perl5.git] / t / op / mkdir.t
CommitLineData
a687059c
LW
1#!./perl
2
5a211162 3print "1..9\n";
a687059c 4
5a211162
GS
5BEGIN {
6 chdir 't' if -d 't';
20822f61 7 @INC = '../lib';
1f47e8e2 8}
a687059c 9
5a211162
GS
10use File::Path;
11rmtree('blurfl');
12
3458556d
J
13# tests 3 and 7 rather naughtily expect English error messages
14$ENV{'LC_ALL'} = 'C';
b598356e 15$ENV{LANGUAGE} = 'C'; # GNU locale extension
3458556d 16
79a0689e
LW
17print (mkdir('blurfl',0777) ? "ok 1\n" : "not ok 1\n");
18print (mkdir('blurfl',0777) ? "not ok 2\n" : "ok 2\n");
7a1f88ac 19print ($! =~ /cannot move|exist|denied/ ? "ok 3\n" : "# $!\nnot ok 3\n");
a687059c
LW
20print (-d 'blurfl' ? "ok 4\n" : "not ok 4\n");
21print (rmdir('blurfl') ? "ok 5\n" : "not ok 5\n");
22print (rmdir('blurfl') ? "not ok 6\n" : "ok 6\n");
7a1f88ac 23print ($! =~ /cannot find|such|exist|not found/i ? "ok 7\n" : "# $!\nnot ok 7\n");
5a211162
GS
24print (mkdir('blurfl') ? "ok 8\n" : "not ok 8\n");
25print (rmdir('blurfl') ? "ok 9\n" : "not ok 9\n");