diff options
author | Reini Urban <rurban@x-ray.at> | 2007-07-07 17:00:54 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-09 08:20:32 +0000 |
commit | 15414d2b8179f5759172a843e63bd4f4857b021d (patch) | |
tree | 365b9feafa15f6262963724e96a2afb7991140a8 /t | |
parent | d1e86c407abee5529d4bd5338b54adfb901e3d73 (diff) | |
download | perl-15414d2b8179f5759172a843e63bd4f4857b021d.tar.gz |
cygwin path conversions, take 4
From: "Reini Urban" <rurban@x-ray.at>
Message-ID: <6910a60707070600xa8638eak3c3f20b20ccc093a@mail.gmail.com>
p4raw-id: //depot/perl@31568
Diffstat (limited to 't')
-rw-r--r-- | t/lib/cygwin.t | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/lib/cygwin.t b/t/lib/cygwin.t index 0148546143..18ada21023 100644 --- a/t/lib/cygwin.t +++ b/t/lib/cygwin.t @@ -9,7 +9,7 @@ BEGIN { } } -use Test::More tests => 4; +use Test::More tests => 8; is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$, "perl pid translates to itself"); @@ -29,3 +29,15 @@ close($ps); is(Cygwin::winpid_to_pid($catwinpid), $catpid, "winpid to pid"); is(Cygwin::pid_to_winpid($catpid), $catwinpid, "pid to winpid"); close($cat); + +is(Cygwin::win_to_posix_path("t\\lib"), "t/lib", "win to posix path: t/lib"); +is(Cygwin::posix_to_win_path("t/lib"), "t\\lib", "posix to win path: t\\lib"); + +use Win32; +use Cwd; +$pwd = getcwd(); +chdir("/"); +$winpath = Win32::GetCwd(); +is(Cygwin::posix_to_win_path("/", 1), $winpath, "posix to absolute win path"); +chdir($pwd); +is(Cygwin::win_to_posix_path($winpath, 1), "/", "win to absolute posix path"); |