This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
File-Path: sync in CPAN version 2.17
[perl5.git] / cpan / Win32 / t / CreateFile.t
CommitLineData
c3c06741
JD
1use strict;
2use Test;
3use Win32;
4
5my $path = "testing-$$";
6rmdir($path) if -d $path;
7unlink($path) if -f $path;
8
9plan tests => 15;
10
11ok(!-d $path);
12ok(!-f $path);
13
14ok(Win32::CreateDirectory($path));
15ok(-d $path);
16
17ok(!Win32::CreateDirectory($path));
18ok(!Win32::CreateFile($path));
19
20ok(rmdir($path));
21ok(!-d $path);
22
23ok(Win32::CreateFile($path));
24ok(-f $path);
25ok(-s $path, 0);
26
27ok(!Win32::CreateDirectory($path));
28ok(!Win32::CreateFile($path));
29
30ok(unlink($path));
31ok(!-f $path);