Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Strict CPAN distribution.

Report information
The Basics
Id: 44187
Status: resolved
Priority: 0/
Queue: Test-Strict

People
Owner: Nobody in particular
Requestors: BOLDRA [...] boldra.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: 0.10



Subject: tests broken on cygwin with Win32 installed
Hi, it seems the newest releases are broken in Cygwin where perl-libwin32 (aka 'Win32') is also installed. This is not installed by default, but when installed, the paths don't resolve in the tests (maybe perl-libwin32 for cygwin is broken?). Win32::GetLongPathName fails. Have you considered using File::Spec here instead? I installed by doing the following: cd /usr/src wget http://search.cpan.org/CPAN/authors/id/P/PD/PDENIS/Test-Strict-0.10.tar.gz tar -xzf Test-Strict-0.10.tar.gz wget http://search.cpan.org/CPAN/authors/id/P/PD/PDENIS/Test-Strict-0.13.tar.gz tar -xzf Test-Strict-0.13.tar.gz cp Test-Strict-0.10/t/* Test-Strict-0.13/t/ cd Test-Strict-0.13 perl Makefile.PL make test make install
From: tzccinct+bitcard [...] gmail.com
Hi, The attached patch got Test-Strict-0.14 to pass t/01all.t in my Cygwin environment. "$^O =~ /Win|Dos/i" matches not only Windows but also cygwin and even darwin. The same code is also there in lib/Test/Strict.pm.
Subject: 01all.t.diff.txt
--- t/01all.t.orig 2010-02-14 09:50:01.000000000 +0900 +++ t/01all.t 2011-01-24 01:47:27.056000000 +0900 @@ -4,7 +4,7 @@ use File::Temp qw( tempdir tempfile ); my $HAS_WIN32 = 0; -if ($^O =~ /Win|Dos/i) { # Load Win32 if we are under Windows and if module is available +if ($^O eq 'MSWin32') { # Load Win32 if we are under Windows and if module is available eval q{ use Win32 }; if ($@) { warn "Optional module Win32 missing, consider installing\n";
This is still not fixed. Our cygwin users are complaining. An alternative patch is: diff -bu ./t/01all.t~ ./t/01all.t --- ./t/01all.t~ 2010-02-13 18:50:01.000000000 -0600 +++ ./t/01all.t 2012-07-30 12:49:26.921875000 -0500 @@ -4,7 +4,7 @@ use File::Temp qw( tempdir tempfile ); my $HAS_WIN32 = 0; -if ($^O =~ /Win|Dos/i) { # Load Win32 if we are under Windows and if module is available +if ($^O =~ /MSWin|Dos/i) { # Load Win32 if we are under Windows and if module is available eval q{ use Win32 }; if ($@) { warn "Optional module Win32 missing, consider installing\n"; -- Reini Urban
From: tzccinct+bitcard [...] gmail.com
Show quoted text
> +if ($^O =~ /MSWin|Dos/i) { # Load Win32 if we are under Windows and if
For reference, /Dos/i also matches "bsdos"(BSD/OS).
Fixed in 0.15 thanks for reporting and suggesting the fix! Please test.
From: tzccinct+bitcard [...] gmail.com
Thank you for for your fixing it in 0.15. Now the test passes. For your reference, there is also a possibly problematic code in Test/Strict.pm line 83. my $IS_WINDOWS = $^O =~ /win|dos/i;
thanks. Will be fixed in next release.