summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-02-26 15:33:04 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-02-26 15:33:04 (GMT)
commitc8c30d6dacd71f453e3bfb95c66cbee3df3468e0 (patch)
treeef78c2d1c6d9e609ffd56e60c2882a85d154cd74 /tests
parent3b5e7e9792b9b34111146557a3353756711b8133 (diff)
parent1609a65c29afebbca87366c03e2aed20468ca7e5 (diff)
downloadtcl-c8c30d6dacd71f453e3bfb95c66cbee3df3468e0.zip
tcl-c8c30d6dacd71f453e3bfb95c66cbee3df3468e0.tar.gz
tcl-c8c30d6dacd71f453e3bfb95c66cbee3df3468e0.tar.bz2
[25842c161f] Ensure that finalization of a zlib stream works.
Diffstat (limited to 'tests')
-rw-r--r--tests/zlib.test42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index ae8742b..1e69745 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -157,6 +157,48 @@ test zlib-7.8 {zlib stream: Bug b26e38a3e4} -constraints zlib -setup {
catch {$strm close}
unset -nocomplain randdata data
} -result {120185 18003000}
+test zlib-7.9 {zlib stream finalize (bug 25842c161)} -constraints zlib -setup {
+ set z1 [zlib stream gzip]
+ set z2 [zlib stream gzip]
+} -body {
+ $z1 put ABCDEedbca..
+ $z1 finalize
+ zlib gunzip [$z1 get]
+} -cleanup {
+ $z1 close
+} -result ABCDEedbca..
+test zlib-7.10 {zlib stream finalize (bug 25842c161)} -constraints zlib -setup {
+ set z2 [zlib stream gzip]
+} -body {
+ $z2 put -finalize ABCDEedbca..
+ zlib gunzip [$z2 get]
+} -cleanup {
+ $z2 close
+} -result ABCDEedbca..
+test zlib-7.11 {zlib stream put -finalize (bug 25842c161)} -constraints zlib -setup {
+ set c [zlib stream gzip]
+ set d [zlib stream gunzip]
+} -body {
+ $c put abcdeEDCBA..
+ $c finalize
+ $d put [$c get]
+ $d finalize
+ $d get
+} -cleanup {
+ $c close
+ $d close
+} -result abcdeEDCBA..
+test zlib-7.12 {zlib stream put; zlib stream finalize (bug 25842c161)} -constraints zlib -setup {
+ set c [zlib stream gzip]
+ set d [zlib stream gunzip]
+} -body {
+ $c put -finalize abcdeEDCBA..
+ $d put -finalize [$c get]
+ $d get
+} -cleanup {
+ $c close
+ $d close
+} -result abcdeEDCBA..
test zlib-8.1 {zlib transformation} -constraints zlib -setup {
set file [makeFile {} test.gz]