projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Update IPC::Cmd to cpan version 0.54
[p5sagit/p5-mst-13.2.git]
/
cpan
/
Win32
/
t
/
GetShortPathName.t
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