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