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; BEGIN { plan(skip_all => "lvalue sub tests need Perl ??") if $] < 5.006 ; # use Test::NoWarnings, if available my $extra = 0 ; $extra = 1 if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; plan tests => 10 + $extra ; use_ok('Compress::Raw::Zlib', 2) ; } my $hello = < 1 ); cmp_ok $x->deflate(getData, getX), '==', Z_OK ; cmp_ok $x->flush(getX), '==', Z_OK ; my $append = "Appended" ; $X .= $append ; ok my $k = new Compress::Raw::Zlib::Inflate ( -AppendOutput => 1 ) ; cmp_ok $k->inflate(getX, getZ), '==', Z_STREAM_END ; ; ok $hello eq $Z ; is $X, $append; }