summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2016-10-30 05:04:54 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2016-10-30 05:04:54 (GMT)
commit51bce8152fb964591bf095135d365d1586291d1c (patch)
tree9d27d22acc9a7d60cc5027c06c5ae8eaa4eab310 /tests
parent597d65b1e9b9c0c40782bc5ee8b372bf4bb6b995 (diff)
parentf50fc619a4f614dc4011b6bf50add8f947d6cb35 (diff)
downloadtcl-51bce8152fb964591bf095135d365d1586291d1c.zip
tcl-51bce8152fb964591bf095135d365d1586291d1c.tar.gz
tcl-51bce8152fb964591bf095135d365d1586291d1c.tar.bz2
[b26e38a3e4] Ensure that compressing streams manage buffers correctly in all cases.
Diffstat (limited to 'tests')
-rw-r--r--tests/zlib.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index 15dbb34..ae8742b 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -138,6 +138,25 @@ test zlib-7.7 {zlib stream: Bug 25842c161} -constraints zlib -body {
} -cleanup {
catch {$s close}
} -result ""
+# Also causes Tk Bug 10f2e7872b
+test zlib-7.8 {zlib stream: Bug b26e38a3e4} -constraints zlib -setup {
+ expr srand(12345)
+ set randdata {}
+ for {set i 0} {$i<6001} {incr i} {
+ append randdata [binary format c [expr {int(256*rand())}]]
+ }
+} -body {
+ set strm [zlib stream compress]
+ for {set i 1} {$i<3000} {incr i} {
+ $strm put $randdata
+ }
+ $strm put -finalize $randdata
+ set data [$strm get]
+ list [string length $data] [string length [zlib decompress $data]]
+} -cleanup {
+ catch {$strm close}
+ unset -nocomplain randdata data
+} -result {120185 18003000}
test zlib-8.1 {zlib transformation} -constraints zlib -setup {
set file [makeFile {} test.gz]