diff options
author | Abigail <abigail@abigail.be> | 2012-03-14 02:39:16 +0100 |
---|---|---|
committer | Abigail <abigail@abigail.be> | 2012-03-14 02:40:06 +0100 |
commit | 1d4b9cf3270c936605a07ecd7414f808755d3184 (patch) | |
tree | ea59e5e28034088fd034504dc0a02af35d583d33 /cpan/IO-Compress/t/cz-03zlib-v1.t | |
parent | 5b73aae5f11067a2f45e856ae2113f569949cf8f (diff) | |
download | perl-1d4b9cf3270c936605a07ecd7414f808755d3184.tar.gz |
Upgrade IO-Compress to 2.049
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, 26 insertions, 8 deletions
diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t index 8b804cbee9..a85ed10e27 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 = 464 ; + $count = 471 ; } @@ -1231,20 +1231,38 @@ sub trickle { - title "repeated calls to flush"; + 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"; my $hello = "I am a HAL 9000 computer" ; - my ($err, $x, $X, $status); + 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" ; - $status = $x->deflate($hello, $X) ; + ($data, $status) = $x->deflate($hello) ; cmp_ok $status, '==', Z_OK, "deflate returned Z_OK" ; - 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"; + ($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"; } |