summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorferrieux@users.sourceforge.net <ferrieux>2012-05-20 20:46:58 (GMT)
committerferrieux@users.sourceforge.net <ferrieux>2012-05-20 20:46:58 (GMT)
commit0a75c29f25f2c708ce825fee5e239fa1edb47de2 (patch)
treed7c7a50e553e41e19eb03bbda70155eeb226ad24
parent0d8fe8f9ba134ac7b2462d1fce62bfd5213f535d (diff)
downloadtcl-0a75c29f25f2c708ce825fee5e239fa1edb47de2.zip
tcl-0a75c29f25f2c708ce825fee5e239fa1edb47de2.tar.gz
tcl-0a75c29f25f2c708ce825fee5e239fa1edb47de2.tar.bz2
Add test showing both loss of bytes and empty-fileevent frenzy.
-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]