Thu Mar 24 04:55:58 2011: Request 66751 was acted upon. Transaction: Correspondence added by rur...@x-ray.at Queue: Win32 Subject: Re: [rt.cpan.org #66751] make test fails on cygwin Broken in: 0.44 Severity: Normal Owner: Nobody Requestors: br...@minton.name Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66751 >
Brian Minton via RT schrieb: > # Test 4 got: "Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz\\xyzzy > \x{394}\x{419} plugh \x{5E7}\x{645}" (t/Unicode.t at line 51) > # Expected:<UNDEF> > # t/Unicode.t line 51 is: ok($file, > Win32::GetLongPathName("$dir\\$_")); > t/Unicode.t ................... Wrong test, cygwin-1.7 does unicode paths not just ascii. attached is my core patch from cygwin branch on github -- Reini Urban
diff --git a/cpan/Win32/t/Unicode.t b/cpan/Win32/t/Unicode.t index 3570142..7ab8a6f 100644 --- a/cpan/Win32/t/Unicode.t +++ b/cpan/Win32/t/Unicode.t @@ -1,6 +1,7 @@ use strict; use Test; use Cwd qw(cwd); +use Config qw(%Config); use Win32; BEGIN { @@ -44,11 +45,13 @@ ok(-d Win32::GetANSIPathName($dir)); Win32::CreateFile($file); ok(-f Win32::GetANSIPathName($file)); -# readdir() returns ANSI form of Unicode filename +# readdir() returns ANSI form of Unicode filename, +# but on cygwin-1.7 the utf-8 form. ok(opendir(my $dh, Win32::GetANSIPathName($dir))); while ($_ = readdir($dh)) { next if /^\./; - ok($file, Win32::GetLongPathName("$dir\\$_")); + skip($^O eq 'cygwin' and $Config{osvers} ge "1.7" ? "do not test cygwin utf8 readdir()" : 0, + $file, Win32::GetLongPathName("$dir\\$_")); } closedir($dh);