Fix [perl #66970] Incorrect coderef in MODIFY_CODE_ATTRIBUTES
[p5sagit/p5-mst-13.2.git] / ext / Win32 / t / GetShortPathName.t
1 use strict;
2 use Test;
3 use Win32;
4
5 my $path = "Long Path $$";
6 unlink($path);
7 END { unlink $path }
8
9 plan tests => 5;
10
11 Win32::CreateFile($path);
12 ok(-f $path);
13
14 my $short = Win32::GetShortPathName($path);
15 ok($short, qr/^\S{1,8}(\.\S{1,3})?$/);
16 ok(-f $short);
17
18 unlink($path);
19 ok(!-f $path);
20 ok(!defined Win32::GetShortPathName($path));