diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2012-03-23 17:07:24 +0000 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2012-04-12 17:43:54 +0100 |
commit | 8341ee1e81d127dbdfb6941f86b35b72fab49837 (patch) | |
tree | 3e828aad79c8a7f42030f1d9652a80db7bfea7f9 /cpan/IO-Compress | |
parent | fc4b5f72837b3df426905782485aee7b794cb692 (diff) | |
download | perl-8341ee1e81d127dbdfb6941f86b35b72fab49837.tar.gz |
[perl #110736] warnings from cpan/IO-Compress/t/cz-03zlib-v1.t
Backported t/cz-03zlib-v1.t from IO-Compress-2.049
Diffstat (limited to 'cpan/IO-Compress')
-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"; } |