From 15414d2b8179f5759172a843e63bd4f4857b021d Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Sat, 7 Jul 2007 17:00:54 +0200 Subject: cygwin path conversions, take 4 From: "Reini Urban" Message-ID: <6910a60707070600xa8638eak3c3f20b20ccc093a@mail.gmail.com> p4raw-id: //depot/perl@31568 --- t/lib/cygwin.t | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 't') 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"); -- cgit v1.2.1