summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-02-11 08:57:53 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-02-11 08:57:53 (GMT)
commit30f60173c4738c76675b58db3a7a5aaa62ca79ea (patch)
tree2438cfef7721fcd81a8173636c444c7fbacdc791 /tests
parentccb47ed928b891b5170b280056291ec35987e4ee (diff)
parentc42232d2a15a091543947a08d7d45379d19bbfb4 (diff)
downloadtcl-30f60173c4738c76675b58db3a7a5aaa62ca79ea.zip
tcl-30f60173c4738c76675b58db3a7a5aaa62ca79ea.tar.gz
tcl-30f60173c4738c76675b58db3a7a5aaa62ca79ea.tar.bz2
Fix [Bug 3603553].
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 891dba0..c469eea 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -366,6 +366,25 @@ test zlib-8.15 {transformtion and fconfigure} -setup {
catch {close $inSide}
catch {$strm close}
} -result {358 358}
+test zlib-8.16 {Bug 3603553: buffer transfer with large writes} -setup {
+ # Actual data isn't very important; needs to be substantially larger than
+ # the internal buffer (32kB) and incompressible.
+ set largeData {}
+ for {set i 0;expr srand(1)} {$i < 100000} {incr i} {
+ append largeData [lindex "a b c d e f g h i j k l m n o p" \
+ [expr {int(16*rand())}]]
+ }
+ set file [makeFile {} test.gz]
+} -constraints zlib -body {
+ set f [open $file wb]
+ fconfigure $f -buffering none
+ zlib push gzip $f
+ puts -nonewline $f $largeData
+ close $f
+ file size $file
+} -cleanup {
+ removeFile $file
+} -result 57647
test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
set sfile [makeFile {} testsrc.gz]