Skip Menu |
 

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

Report information
The Basics
Id: 21933
Status: open
Priority: 0/
Queue: Test-Files

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

Bug Information
Severity: Important
Broken in: 0.12
Fixed in: (no value)



Subject: Unix slashes in regexps
Download (untitled) / with headers
text/plain 136b
ActiveState perl v5.8.7 built for MSWin32-x86-multi-thread Binary build 813 Log attached. ------- Alexandr Ciornii, http://chorny.net
Subject: error.log
Download error.log
application/octet-stream 11.9k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 184b
File::Spec uses '\' separator for files, but tests are run with '/'. Attached patch for two tests. Test files 4-8 should be patched similarly. -- Alexandr Ciornii, http://chorny.net
--- 03compare_ok.t.dist Mon Apr 30 19:28:36 2007 +++ 03compare_ok.t Mon Apr 30 19:26:46 2007 @@ -6,11 +6,17 @@ use Test::Files; my $test_file = File::Spec->catfile( 't', '03compare_ok.t' ); +$test_file=~s#\\#/#g if $^O eq 'MSWin32'; my $missing_file = File::Spec->catfile( 't', 'missing' ); +$missing_file=~s#\\#/#g if $^O eq 'MSWin32'; my $pass_file = File::Spec->catfile( 't', 'ok_pass.dat' ); +$pass_file=~s#\\#/#g if $^O eq 'MSWin32'; my $absent_file = File::Spec->catfile( 't', 'absent' ); +$absent_file=~s#\\#/#g if $^O eq 'MSWin32'; my $same_file = File::Spec->catfile( 't', 'ok_pass.same.dat' ); +$same_file=~s#\\#/#g if $^O eq 'MSWin32'; my $diff_file = File::Spec->catfile( 't', 'ok_pass.diff.dat' ); +$diff_file=~s#\\#/#g if $^O eq 'MSWin32'; #----------------------------------------------------------------- # Compare two files with the same content.
Download 02file_ok.t.patch
text/x-diff 570b
--- 02file_ok.t.dist Mon Apr 30 19:28:36 2007 +++ 02file_ok.t Mon Apr 30 19:23:08 2007 @@ -6,8 +6,11 @@ use Test::Files; my $test_file = File::Spec->catfile( 't', '02file_ok.t' ); +$test_file=~s#\\#/#g if $^O eq 'MSWin32'; my $missing_file = File::Spec->catfile( 't', 'missing' ); +$missing_file=~s#\\#/#g if $^O eq 'MSWin32'; my $ok_pass_file = File::Spec->catfile( 't', 'ok_pass.dat' ); +$ok_pass_file=~s#\\#/#g if $^O eq 'MSWin32'; #----------------------------------------------------------------- # Compare text to a file with same text.
Subject: Re: [rt.cpan.org #21933] Unix slashes in regexps
Date: Tue, 1 May 2007 15:23:51 -0500
To: bug-Test-Files [...] rt.cpan.org
From: "Phil Crow" <crow.phil [...] gmail.com>
Download (untitled) / with headers
text/plain 1000b
Thanks for your interest in using Test::Files and for taking the time to write up a bug report. But, I'm sorry to say, these patches don't make sense to me. The whole reason I used File::Spec is so that it would use \ on windows and / on unix. But your patches swap the \ I think should be correct, for the / I think is incorrect /. Perhaps you could send the output of the failing tests so I can see what's wrong. Is there any chance that you are using some combination of Cygwin and ActiveState Perl? I have to object to excessive OS testing when File::Spec is supposed to take care of the differences in slashing. Phil On 4/30/07, Alexandr Ciornii via RT <bug-Test-Files@rt.cpan.org> wrote: Show quoted text
> > > Queue: Test-Files > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21933 > > > File::Spec uses '\' separator for files, but tests are run with '/'. > Attached patch for two tests. > Test files 4-8 should be patched similarly. > > -- > Alexandr Ciornii, http://chorny.net > > >


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.