On May 4, 2005, at 10:08 AM, DH wrote:

t/02_methods....# No long filename support - long filename extraction disabled
t/02_methods....ok 1/0Could not open file
'C:\Perl\.cpanplus\5.8.4\build\Archive-Tar-1.24\t\C: \Perl\.cpanplus\5.8.4\build\Archive-Tar-1.24
\t\src\short\3312': Invalid argument at t/02_methods.t line 693


t/02_methods....NOK 134#     Failed test (t/02_methods.t at line 693)

t/02_methods....NOK 135# Failed test (t/02_methods.t at line 695)
Could not open file
'C:\Perl\.cpanplus\5.8.4\build\Archive-Tar-1.24\t\C: \Perl\.cpanplus\5.8.4\build\Archive-Tar-1.24\t\src\short\3312':
In
valid argument at t/02_methods.t line 693

This is either a very weird bug with file::spec, or a logic error in the tests i can't quite tackle... here's the relevant code snippet:


### warn if we are going to skip long file names
$TOO_LONG ? diag("No long filename support - long filename extraction disabled")
: ( push @EXPECT_NORMAL, [ [], $LONG_FILE, qr/^hello\s*$/] ) ;


my @ROOT = grep { length } 'src', $TOO_LONG ? 'short' : 'long';

[....]

    ### alternate extract path tests
    ### to abs and rel paths
    {   for my $outpath (   File::Spec->catdir( @ROOT ),
                            File::Spec->rel2abs(
                                File::Spec->catdir( @ROOT )
                            )
        ) {

            my $outfile = File::Spec->catfile( $outpath, $$ );

            ok( $tar->extract_file( $file->full_path, $outfile ),
                            "   Extracted file '$path' to $outfile" );
            ok( -e $outfile,"   Extracted file '$outfile' exists" );

            rm( $outfile ) unless $NO_UNLINK;
        }
    }

In short, @ROOT holds a list of directories relative to the t dir.
once we run the test with the relative path, once iwth the absolute...
and the 2nd one breaks with teh above error... i can't quite understand
why that would happen... could you add some debug code on the relevant
lines and see what's being attempted?

Thanks,

--
        Jos Boumans
        
        "Never ask a man what computer he uses. If it's a Mac, he'll
        tell you. If it's not, why embarrass him?" - Tom Clancy

        CPANPLUS        http://cpanplus.sf.net
                



Reply via email to