Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: alexchorny [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.07
Fixed in: (no value)



Subject: Tests fail under Win32
Download (untitled) / with headers
text/plain 180b
ActiveState perl v5.8.7 built for MSWin32-x86-multi-thread Binary build 813 Tests under Vanilla Perl & Cygwin also fail. log attached ------- Alexandr Ciornii, http://chorny.net
Subject: errlog
Download errlog
application/octet-stream 9.1k

Message body not shown because it is not plain text.

From: SMUELLER [...] cpan.org
Download (untitled) / with headers
text/plain 529b
On Sa. 26. Aug. 2006, 17:34:46, alexchorny@gmail.com wrote: Show quoted text
> ActiveState perl v5.8.7 built for MSWin32-x86-multi-thread > Binary build 813 > Tests under Vanilla Perl & Cygwin also fail. > > log attached
Damn, rt.cpan.org ate my answer. I addressed these issues. Patches to Strict.pm and 02fail.t attached. 02fail.t isn't going to work on win32 because it disallows two processes accessing the same file. Strict.pm has a too tight untainting regex and lacks a quotemeta. Pierre, would you consider making a release? Steffen
Download ts_diff.txt
text/plain 675b
--- Test-Strict-0.07/lib/Test/Strict.pm 2005-05-29 05:47:47.000000000 +0200 +++ Test-Strict-0.08/lib/Test/Strict.pm 2006-08-31 11:59:09.000000000 +0200 @@ -70,7 +70,7 @@ $VERSION = '0.07'; $PERL = $^X || 'perl'; $COVERAGE_THRESHOLD = 50; # 50% -$UNTAINT_PATTERN = qr|^([-+@\w./:\\]+)$|; +$UNTAINT_PATTERN = qr|^(.*)$|; $PERL_PATTERN = qr/^#!.*perl/; $CAN_USE_WARNINGS = ($] >= 5.006); $TEST_SYNTAX = 1; @@ -167,6 +167,7 @@ local $ENV{PATH} = _untaint($ENV{PATH}) if $ENV{PATH}; my $eval = `$perl_bin $inc -c $file 2>&1`; + $file = quotemeta($file); my $ok = $eval =~ qr!$file syntax OK!ms; $Test->ok($ok, $test_txt); unless ($ok) {
From: SMUELLER [...] cpan.org
Download (untitled) / with headers
text/plain 152b
On Do. 31. Aug. 2006, 06:17:29, SMUELLER wrote: Show quoted text
> Damn, rt.cpan.org ate my answer.
... which is why I'm attaching the second diff in a separate answer.
Download ts_02fail.diff
text/x-diff 523b
--- Test-Strict-0.07/t/02fail.t 2005-03-21 00:00:05.000000000 +0100 +++ Test-Strict-0.08/t/02fail.t 2006-08-31 11:43:16.000000000 +0200 @@ -8,10 +8,18 @@ ## use strict; +BEGIN { + if ($^O =~ /win32/i) { + require Test::More; + Test::More->import( + skip_all => "Windows does not allow two processes to access the same file." + ); + } +} + use Test::More tests => 8; use File::Temp qw( tempdir tempfile ); - my $perl = $^X || 'perl'; my $inc = join(' -I ', @INC) || ''; $inc = "-I $inc" if $inc;
Steffen is uploading to CPAN the new version fixing this bug.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.