summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-05-23 13:13:46 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-05-23 13:13:46 (GMT)
commit22931fabb9fcd685d6e4b1e4574e02c20f826d70 (patch)
treec4ac8430ccc82216df861def489d1964a62f7ee6 /tests
parent565885307e6c24d3a27eaa01d7701dd2819336a8 (diff)
parent3cc210b6d0579358daa94a0f3670e30c973b7f34 (diff)
downloadtcl-22931fabb9fcd685d6e4b1e4574e02c20f826d70.zip
tcl-22931fabb9fcd685d6e4b1e4574e02c20f826d70.tar.gz
tcl-22931fabb9fcd685d6e4b1e4574e02c20f826d70.tar.bz2
* generic/tclZlib.c (ZlibTransformInput): [Bug 3525907]: Ensure that
decompressed input is flushed through the transform correctly when the input stream gets to the end. Thanks to Alexandre Ferrieux and Andreas Kupries for their work on this.
Diffstat (limited to 'tests')
-rw-r--r--tests/zlib.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index d8d710a..4ed5b33 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -169,6 +169,24 @@ test zlib-8.4 {transformation and flushing: Bug 3517696} -setup {
catch {close $fd}
removeFile $file
} -result {}
+test zlib-8.5 {transformation and flushing and fileevents: Bug 3525907} -setup {
+ foreach {r w} [chan pipe] break
+} -constraints zlib -body {
+ set ::res {}
+ fconfigure $w -buffering none
+ zlib push compress $w
+ puts -nonewline $w qwertyuiop
+ chan configure $w -flush sync
+ after 500 {puts -nonewline $w asdfghjkl;close $w}
+ fconfigure $r -blocking 0 -buffering none
+ zlib push decompress $r
+ fileevent $r readable {set msg [read $r];lappend ::res $msg;if {[eof $r]} {set ::done 1}}
+ after 250 {lappend ::res MIDDLE}
+ vwait ::done
+ set ::res
+} -cleanup {
+ catch {close $r}
+} -result {qwertyuiop MIDDLE asdfghjkl}
test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
set sfile [makeFile {} testsrc.gz]