diff options
Diffstat (limited to 'cpan/IO-Compress/t/cz-03zlib-v1.t')
-rw-r--r-- | cpan/IO-Compress/t/cz-03zlib-v1.t | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t index a85ed10e27..8b804cbee9 100644 --- a/cpan/IO-Compress/t/cz-03zlib-v1.t +++ b/cpan/IO-Compress/t/cz-03zlib-v1.t @@ -26,7 +26,7 @@ BEGIN $count = 453 ; } else { - $count = 471 ; + $count = 464 ; } @@ -1231,38 +1231,20 @@ sub trickle { - title "repeated calls to flush - no compression"; - - my ($err, $x, $X, $status, $data); - - ok( ($x, $err) = deflateInit ( ), "Create deflate object" ); - isa_ok $x, "Compress::Raw::Zlib::deflateStream" ; - cmp_ok $err, '==', Z_OK, "status is Z_OK" ; - - - ($data, $status) = $x->flush(Z_SYNC_FLUSH) ; - cmp_ok $status, '==', Z_OK, "flush returned Z_OK" ; - ($data, $status) = $x->flush(Z_SYNC_FLUSH) ; - cmp_ok $status, '==', Z_OK, "second flush returned Z_OK" ; - is $data, "", "no output from second flush"; -} - -{ - title "repeated calls to flush - after compression"; + title "repeated calls to flush"; my $hello = "I am a HAL 9000 computer" ; - my ($err, $x, $X, $status, $data); + my ($err, $x, $X, $status); ok( ($x, $err) = deflateInit ( ), "Create deflate object" ); isa_ok $x, "Compress::Raw::Zlib::deflateStream" ; cmp_ok $err, '==', Z_OK, "status is Z_OK" ; - ($data, $status) = $x->deflate($hello) ; + $status = $x->deflate($hello, $X) ; cmp_ok $status, '==', Z_OK, "deflate returned Z_OK" ; - ($data, $status) = $x->flush(Z_SYNC_FLUSH) ; - cmp_ok $status, '==', Z_OK, "flush returned Z_OK" ; - ($data, $status) = $x->flush(Z_SYNC_FLUSH) ; - cmp_ok $status, '==', Z_OK, "second flush returned Z_OK" ; - is $data, "", "no output from second flush"; + cmp_ok $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "flush returned Z_OK" ; + $X = ''; + cmp_ok $x->flush($X, Z_SYNC_FLUSH), '==', Z_OK, "second flush returned Z_OK" ; + is $X, "", "no output from second flush"; } |