Skip Menu |

This queue is for tickets about the Archive-Extract CPAN distribution.

Report information
The Basics
Id: 11054
Status: resolved
Priority: 0/
Queue: Archive-Extract

People
Owner: Nobody in particular
Requestors: barbie [...] missbarbell.co.uk
Cc:
AdminCc:

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



Subject: tests fail on Windows due to Unix delimiters
The test script tests whether the directory & file combination is successfully dragged out. However, the tar/zip/gzip combinations all appear to use the Unix directory delimiter, '/'. On Windows this fails as the expected path will be 'y\z', but is saved as 'y/z'. Added a $nix_path variable to replace the $rel_path for those specific tests.
--- C:\wip\diffs\Archive-Extract\Archive-Extract-0.07/t/01_Archive-Extract.t Wed Dec 8 19:34:19 2004 +++ C:\wip\diffs\Archive-Extract\Archive-Extract-0.07-barbie/t/01_Archive-Extract.t Tue Jan 18 14:34:03 2005 @@ -106,6 +106,7 @@ my $rel_path = File::Spec->catfile( grep { defined } $dir, $file ); my $abs_path = File::Spec->catfile( $OutDir, $rel_path ); my $abs_dir = File::Spec->catdir( grep { defined } $OutDir, $dir ); + my $nix_path = join("/", grep { defined } $dir, $file ); ### check if we can run this test ### @@ -157,8 +158,8 @@ my $file_cnt = grep { defined } $file, $dir; is( scalar @{ $ae->files || []}, $file_cnt, "Found correct number of output files" ); - is( $ae->files->[-1], $rel_path, - "Found correct output file '$rel_path'" ); + is( $ae->files->[-1], $nix_path, + "Found correct output file '$nix_path'" ); ok( -e $abs_path, "Output file '$abs_path' exists" ); ok( $ae->extract_path, @@ -175,7 +176,7 @@ eval { rmtree( $ae->extract_path ) }; ok( !$@, " rmtree gave no error" ); ok( !(-d $ae->extract_path ), - " Extracth dir succesfully removed" ); + " Extract dir successfully removed" ); } } } }
[BARBIE - Tue Jan 18 12:03:28 2005]: Show quoted text
> The test script tests whether the directory & file combination is > successfully dragged out. However, the tar/zip/gzip combinations > all appear to use the Unix directory delimiter, '/'. On Windows > this fails as the expected path will be 'y\z', but is saved as > 'y/z'. > > Added a $nix_path variable to replace the $rel_path for those specific > tests.
Thanks, applied @ 11920