"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/011-streamzip.t" between
IO-Compress-2.100.tar.gz and IO-Compress-2.101.tar.gz

About: IO-Compress is a Perl interface to the zlib compression library (contains Compress-Zlib, IO-Compress-Zlib, IO-Compress-Bzip2, IO-Compress-Base).

011-streamzip.t  (IO-Compress-2.100):011-streamzip.t  (IO-Compress-2.101)
skipping to change at line 28 skipping to change at line 28
BEGIN BEGIN
{ {
plan(skip_all => "Needs Perl 5.005 or better - you have Perl $]" ) plan(skip_all => "Needs Perl 5.005 or better - you have Perl $]" )
if $] < 5.005 ; if $] < 5.005 ;
# use Test::NoWarnings, if available # use Test::NoWarnings, if available
my $extra = 0 ; my $extra = 0 ;
$extra = 1 $extra = 1
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
plan tests => 8 + $extra ; plan tests => 136 + $extra ;
} }
my $Inc = join " ", map qq["-I$_"] => @INC; my $Inc = join " ", map qq["-I$_"] => @INC;
$Inc = '"-MExtUtils::testlib"' $Inc = '"-MExtUtils::testlib"'
if ! $ENV{PERL_CORE} && eval " require ExtUtils::testlib; " ; if ! $ENV{PERL_CORE} && eval " require ExtUtils::testlib; " ;
my $Perl = ($ENV{'FULLPERL'} or $^X or 'perl') ; my $Perl = ($ENV{'FULLPERL'} or $^X or 'perl') ;
$Perl = qq["$Perl"] if $^O eq 'MSWin32' ; $Perl = qq["$Perl"] if $^O eq 'MSWin32' ;
$Perl = "$Perl $Inc -w" ; $Perl = "$Perl $Inc -w" ;
skipping to change at line 101 skipping to change at line 101
writeFile($infile, $hello1) ; writeFile($infile, $hello1) ;
check "$Perl ${binDir}/streamzip <$infile >$outfile"; check "$Perl ${binDir}/streamzip <$infile >$outfile";
my $uncompressed ; my $uncompressed ;
unzip $outfile => \$uncompressed; unzip $outfile => \$uncompressed;
is $uncompressed, $hello1; is $uncompressed, $hello1;
} }
{ {
title "streamzip" ; title "streamzip - zipfile option" ;
my ($infile, $outfile); my ($infile, $outfile);
my $lex = LexFile->new( $infile, $outfile ); my $lex = LexFile->new( $infile, $outfile );
writeFile($infile, $hello1) ; writeFile($infile, $hello1) ;
check "$Perl ${binDir}/streamzip -zipfile=$outfile <$infile"; check "$Perl ${binDir}/streamzip -zipfile $outfile <$infile";
my $uncompressed ; my $uncompressed ;
unzip $outfile => \$uncompressed; unzip $outfile => \$uncompressed;
is $uncompressed, $hello1; is $uncompressed, $hello1;
} }
for my $method (qw(store deflate bzip2 lzma xz zstd))
{
SKIP:
{
if ($method eq 'lzma')
{
eval { require IO::Compress::Lzma } ;
skip "Method 'lzma' needs IO::Compress::Lzma\n", 8
if $@;
}
if ($method eq 'zstd')
{
eval { require IO::Compress::Zstd } ;
skip "Method 'zstd' needs IO::Compress::Zstd\n", 8
if $@;
}
if ($method eq 'xz')
{
eval { require IO::Compress::Xz } ;
skip "Method 'zstd' needs IO::Compress::Xz\n", 8
if $@;
}
{
title "streamzip method $method" ;
my ($infile, $outfile);
my $lex = LexFile->new( $infile, $outfile );
writeFile($infile, $hello1) ;
check "$Perl ${binDir}/streamzip -method $method <$infile >$outfile"
;
my $uncompressed ;
unzip $outfile => \$uncompressed;
is $uncompressed, $hello1;
}
{
title "streamzip $method- zipfile option" ;
my ($infile, $outfile);
my $lex = LexFile->new( $infile, $outfile );
writeFile($infile, $hello1) ;
check "$Perl ${binDir}/streamzip -zipfile $outfile -method $method <
$infile";
my $uncompressed ;
unzip $outfile => \$uncompressed;
is $uncompressed, $hello1;
}
}
}
for my $level (0 ..9)
{
{
title "streamzip level $level" ;
my ($infile, $outfile);
my $lex = LexFile->new( $infile, $outfile );
writeFile($infile, $hello1) ;
check "$Perl ${binDir}/streamzip -$level <$infile >$outfile";
my $uncompressed ;
unzip $outfile => \$uncompressed;
is $uncompressed, $hello1;
}
{
title "streamzip level $level- zipfile option" ;
my ($infile, $outfile);
my $lex = LexFile->new( $infile, $outfile );
writeFile($infile, $hello1) ;
check "$Perl ${binDir}/streamzip -zipfile $outfile -$level <$infile";
my $uncompressed ;
unzip $outfile => \$uncompressed;
is $uncompressed, $hello1;
}
}
 End of changes. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)