Skip Menu |
 

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 72019
Status: resolved
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: DOUGDUDE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.039
Fixed in: 2.040

Attachments
0001-Use-system-path-seperators-in-tests-with-CanonicalNa.patch



Subject: CanonicalName test failure on Windows
The new test in t/105oneshot-zip-only.t for the CanonicalName & FilterName features fails for the two tests where CanonicalName is set to false. This is because the name is returned using the system's path separators, so on systems that do not use "/" (like Windows) it fails because the path separators are different. Attached is a possible patch for this. C:\strawberry\cpan\build\IO-Compress-2.039-ZznmCo>prove -l t\105oneshot-zip-only.t t\105oneshot-zip-only.t .. 48/217 # Failed test (t\105oneshot-zip-only.t at line 149) # got: '\fred\joe' # expected: '/fred/joe' # Failed test (t\105oneshot-zip-only.t at line 161) # got: '\fred\jim' # expected: '/fred/jim' # Looks like you failed 2 tests of 217. t\105oneshot-zip-only.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/217 subtests Test Summary Report ------------------- t\105oneshot-zip-only.t (Wstat: 512 Tests: 217 Failed: 2) Failed tests: 89, 116 Non-zero exit status: 2 Files=1, Tests=217, 9 wallclock secs ( 0.03 usr + 0.03 sys = 0.06 CPU) Result: FAIL
Subject: 0001-Use-system-path-seperators-in-tests-with-CanonicalNa.patch
From 77e255ffc6572af293affe86f950fff72736bc7f Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson <doug@somethingdoug.com> Date: Fri, 28 Oct 2011 14:39:55 -0400 Subject: [PATCH] Use system path seperators in tests with CanonicalName => 0 --- t/105oneshot-zip-only.t | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/105oneshot-zip-only.t b/t/105oneshot-zip-only.t index aac32f6..1f43c2c 100644 --- a/t/105oneshot-zip-only.t +++ b/t/105oneshot-zip-only.t @@ -146,7 +146,7 @@ sub zipGetHeader is $hdr->{Name}, "fred/joe", " Name is 'fred/joe'" ; $hdr = zipGetHeader($file1, $content, Name => $abs, CanonicalName => 0) ; - is $hdr->{Name}, "/fred/joe", " Name is '/fred/joe'" ; + is $hdr->{Name}, File::Spec->catfile("", "fred", "joe"), " Name is '/fred/joe'" ; $hdr = zipGetHeader($file1, $content, FilterName => sub {$_ = "abcde"}); is $hdr->{Name}, "abcde", " Name is 'abcde'" ; @@ -158,7 +158,7 @@ sub zipGetHeader $hdr = zipGetHeader($file1, $content, Name => $abs, CanonicalName => 0, FilterName => sub { s/joe/jim/ }); - is $hdr->{Name}, "/fred/jim", " Name is '/fred/jim'" ; + is $hdr->{Name}, File::Spec->catfile("", "fred", "jim"), " Name is '/fred/jim'" ; } for my $stream (0, 1) -- 1.7.6.msysgit.0
Thanks for the bug report. Patch looks fine. I'll get it posted to CPAN shortly. Paul
Thanks, Paul. I just received 2.040 and the Windows clients now pass their tests.
Download (untitled) / with headers
text/plain 167b
On Fri Oct 28 18:33:11 2011, DOUGDUDE wrote: Show quoted text
> Thanks, Paul. I just received 2.040 and the Windows clients now pass > their tests.
Good. I'll close this ticket. Paul


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.