Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the ack CPAN distribution.

Maintainer(s)' notes

ack's issues are tracked at https://github.com/petdance/ack2

Report information
The Basics
Id: 22762
Status: resolved
Priority: 0/
Queue: ack

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

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



Subject: [PATCH] get tests passing on win32 (using same method as File::Next)
Date: Thu, 2 Nov 2006 10:47:21 -0800
To: bug-ack [...] rt.cpan.org
From: "jerry gay" <jerry.gay [...] gmail.com>
Index: t/interesting.t =================================================================== --- t/interesting.t (revision 58) +++ t/interesting.t (working copy) @@ -26,7 +26,7 @@ push( @files, $file ); } - is_deeply( [sort @files], [sort qw( + _sets_match( \@files, [qw( t/swamp/Makefile.PL t/swamp/perl.cgi t/swamp/perl.pl @@ -51,7 +51,7 @@ push( @files, $file ); } - is_deeply( [sort @files], [sort qw( + _sets_match( \@files, [qw( t/swamp/Makefile.PL t/swamp/perl.cgi t/swamp/perl.pl @@ -74,7 +74,7 @@ push( @files, $file ); } - is_deeply( [sort @files], [sort qw( + _sets_match( \@files, [qw( t/swamp/parrot.pir t/swamp/perl.pod )], 'PARROT_FILES_DESCEND' ); @@ -92,7 +92,7 @@ push( @files, $file ); } - is_deeply( [sort @files], [sort qw( + _sets_match( \@files, [qw( t/swamp/parrot.pir t/swamp/perl.pod )], 'PARROT_FILES_NODESCEND' ); @@ -110,7 +110,7 @@ push( @files, $file ); } - is_deeply( [@files], [], 'PARROT_FILES_NODESCEND_EMPTY' ); + _sets_match( \@files, [], 'PARROT_FILES_NODESCEND_EMPTY' ); } PERL_FILES_BY_NAME: { @@ -125,7 +125,7 @@ push( @files, $file ); } - is_deeply( [sort @files], [sort qw( t/swamp/perl.pod )], 'PERL_FILES_BY_NAME' ); + _sets_match( \@files, [qw( t/swamp/perl.pod )], 'PERL_FILES_BY_NAME' ); } BINARY_FILES: { @@ -140,8 +140,21 @@ push( @files, $file ); } - is_deeply( [sort @files], [sort qw( + _sets_match( \@files, [qw( t/swamp/moose-andy.jpg )], 'BINARY_FILES' ); } +sub _sets_match { + my @expected = @{+shift}; + my @actual = @{+shift}; + my $msg = shift; + + # Normalize all the paths + for my $path ( @expected, @actual ) { + $path = File::Next::_reslash( $path ); + } + + local $Test::Builder::Level = $Test::Builder::Level + 1; ## no critic + return is_deeply( [sort @expected], [sort @actual], $msg ); +}
Added in 1.30. Thanks.