summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 09:18:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 09:18:06 (GMT)
commit1fb25505b732b94f74aae7edc392508bdd8a30fa (patch)
tree6d0803a80ce796b40f3601e4c6da7b561ad57f30 /tests
parent860e6b5e43e0ac7e673218dd929d425c5d206014 (diff)
parent1be9bc0869341de7806f25de58a35e8320b42ee5 (diff)
downloadtcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.zip
tcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.tar.gz
tcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.tar.bz2
merge current trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/zlib.test32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index 47eeab8..dac11e4 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -156,6 +156,7 @@ test zlib-8.3 {zlib transformation and fileevent} -constraints zlib -setup {
close $srv
removeFile $file
} -result 81920-->81920
+
test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
set sfile [makeFile {} testsrc.gz]
set file [makeFile {} test.gz]
@@ -569,6 +570,37 @@ test zlib-10.2 "bug #2818131 (mismatch gets)" -constraints {
rename bgerror {}
rename zlibRead {}
} -result {error {invalid block type}}
+
+test zlib-11.1 "Bug #3390073: mis-appled gzip filtering" -setup {
+ set file [makeFile {} test.input]
+} -constraints zlib -body {
+ set f [open $file wb]
+ puts -nonewline [zlib push gzip $f] [string repeat "hello" 1000]
+ close $f
+ set f [open $file rb]
+ set d [read $f]
+ close $f
+ set d [zlib gunzip $d]
+ list [regexp -all "hello" $d] [string length [regsub -all "hello" $d {}]]
+} -cleanup {
+ removeFile $file
+} -result {1000 0}
+test zlib-11.2 "Bug #3390073: mis-appled gzip filtering" -setup {
+ set file [makeFile {} test.input]
+} -constraints zlib -body {
+ set f [open $file wb]
+ puts -nonewline [zlib push gzip $f -header {filename /foo/bar}] \
+ [string repeat "hello" 1000]
+ close $f
+ set f [open $file rb]
+ set d [read $f]
+ close $f
+ set d [zlib gunzip $d -header h]
+ list [regexp -all "hello" $d] [dict get $h filename] \
+ [string length [regsub -all "hello" $d {}]]
+} -cleanup {
+ removeFile $file
+} -result {1000 /foo/bar 0}
::tcltest::cleanupTests
return