Commit | Line | Data |
---|---|---|
8883bb5a | 1 | use strict;\r |
2 | use Test;\r | |
3 | use Win32;\r | |
4 | \r | |
5 | my $path = "Long Path $$";\r | |
6 | unlink($path);\r | |
7 | END { unlink $path }\r | |
8 | \r | |
9 | plan tests => 5;\r | |
10 | \r | |
11 | Win32::CreateFile($path);\r | |
12 | ok(-f $path);\r | |
13 | \r | |
14 | my $short = Win32::GetShortPathName($path);\r | |
15 | ok($short, qr/^\S{1,8}(\.\S{1,3})?$/);\r | |
16 | ok(-f $short);\r | |
17 | \r | |
18 | unlink($path);\r | |
19 | ok(!-f $path);\r | |
20 | ok(!defined Win32::GetShortPathName($path));\r |