Fri Aug 26 10:51:29 2011: Request 66751 was acted upon.
Transaction: Correspondence added by toni.andjelko...@s-itsolutions.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: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66751 >


The test fails because readdir() on Cygwin returns a scalar containing UTF8,
but it does not set the scalar's UTF-8 flag. It helps to set the flag
explicitely:

--- t/Unicode.t.bak     2011-08-26 16:37:11.483644100 +0200
+++ t/Unicode.t 2011-08-26 16:45:10.802566000 +0200
@@ -1,5 +1,6 @@
 use strict;
 use Test;
+use Encode;
 use Cwd qw(cwd);
 use Win32;

@@ -48,6 +49,7 @@
 ok(opendir(my $dh, Win32::GetANSIPathName($dir)));
 while ($_ = readdir($dh)) {
     next if /^\./;
+    Encode::_utf8_on($_) if $^O eq "cygwin";
     ok($file, Win32::GetLongPathName("$dir\\$_"));
 }
 closedir($dh);

--
Toni Andjelkovic
s IT Solutions
Risk and Balance Sheet Management Solutions

s IT Solutions AT Spardat GmbH
A-1010 Wien, Werdertorgasse 5
Phone: +43 (0) 50100 - 16558
Fax: +43 (0) 50100 9 - 16558
mailto:toni.andjelko...@s-itsolutions.at
http://www.s-itsolutions.com



Reply via email to