BEGIN { if ($ENV{PERL_CORE}) { chdir 't' if -d 't'; @INC = ("../lib", "lib/compress"); } } use lib qw(t t/compress); use strict; use warnings; use bytes; use Test::More ; use CompTestUtils; use IO::Uncompress::Unzip 'unzip' ; BEGIN { plan(skip_all => "Needs Perl 5.005 or better - you have Perl $]" ) if $] < 5.005 ; # use Test::NoWarnings, if available my $extra = 0 ; $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; plan tests => 8 + $extra ; } my $Inc = join " ", map qq["-I$_"] => @INC; $Inc = '"-MExtUtils::testlib"' if ! $ENV{PERL_CORE} && eval " require ExtUtils::testlib; " ; my $Perl = ($ENV{'FULLPERL'} or $^X or 'perl') ; $Perl = qq["$Perl"] if $^O eq 'MSWin32' ; $Perl = "$Perl $Inc -w" ; #$Perl .= " -Mblib " ; my $binDir = $ENV{PERL_CORE} ? "../ext/IO-Compress/bin/" : "./bin/"; my $hello1 = <$outfile"; my $uncompressed ; unzip $outfile => \$uncompressed; is $uncompressed, $hello1; } { title "streamzip" ; my ($infile, $outfile); my $lex = new LexFile $infile, $outfile ; writeFile($infile, $hello1) ; check "$Perl ${binDir}/streamzip -zipfile=$outfile <$infile"; my $uncompressed ; unzip $outfile => \$uncompressed; is $uncompressed, $hello1; }