xref: /openbsd-src/gnu/usr.bin/perl/cpan/Win32/t/CreateFile.t (revision 91f110e064cd7c194e59e019b83bb7496c1c84d4)
1*b39c5158Smillertuse strict;
2*b39c5158Smillertuse Test;
3*b39c5158Smillertuse Win32;
4*b39c5158Smillert
5*b39c5158Smillertmy $path = "testing-$$";
6*b39c5158Smillertrmdir($path)  if -d $path;
7*b39c5158Smillertunlink($path) if -f $path;
8*b39c5158Smillert
9*b39c5158Smillertplan tests => 15;
10*b39c5158Smillert
11*b39c5158Smillertok(!-d $path);
12*b39c5158Smillertok(!-f $path);
13*b39c5158Smillert
14*b39c5158Smillertok(Win32::CreateDirectory($path));
15*b39c5158Smillertok(-d $path);
16*b39c5158Smillert
17*b39c5158Smillertok(!Win32::CreateDirectory($path));
18*b39c5158Smillertok(!Win32::CreateFile($path));
19*b39c5158Smillert
20*b39c5158Smillertok(rmdir($path));
21*b39c5158Smillertok(!-d $path);
22*b39c5158Smillert
23*b39c5158Smillertok(Win32::CreateFile($path));
24*b39c5158Smillertok(-f $path);
25*b39c5158Smillertok(-s $path, 0);
26*b39c5158Smillert
27*b39c5158Smillertok(!Win32::CreateDirectory($path));
28*b39c5158Smillertok(!Win32::CreateFile($path));
29*b39c5158Smillert
30*b39c5158Smillertok(unlink($path));
31*b39c5158Smillertok(!-f $path);
32