summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-05-01 08:29:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-05-01 08:29:11 (GMT)
commita0fbc952a8b199b3bc07bf4dbef4d504a9eae73e (patch)
treef1f1b08d636e42a846a20c89cb041ff56a8bb0a7 /tests
parent8ee166780cbfe234c62b815deec072a75c5dc9ad (diff)
downloadtcl-a0fbc952a8b199b3bc07bf4dbef4d504a9eae73e.zip
tcl-a0fbc952a8b199b3bc07bf4dbef4d504a9eae73e.tar.gz
tcl-a0fbc952a8b199b3bc07bf4dbef4d504a9eae73e.tar.bz2
first actual test of doing something with a compression dictionary
Diffstat (limited to 'tests')
-rw-r--r--tests/zlib.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index 017243b..05b5ed5 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -188,6 +188,21 @@ test zlib-8.6 {transformation and fconfigure} -setup {
catch {close $fd}
removeFile $file
} -result {{-blocking 1 -buffering full -buffersize 4096 -encoding binary -eofchar {} -translation lf} {-blocking 1 -buffering full -buffersize 4096 -encoding binary -eofchar {} -translation lf -checksum 0} {-blocking 1 -buffering full -buffersize 4096 -encoding binary -eofchar {} -translation lf}}
+test zlib-8.7 {transformtion and fconfigure} -setup {
+ lassign [chan pipe] inSide outSide
+ set msg [string repeat "am i all that i am at all? i am all that i am!" 400]
+ set dict "thatallam i "
+} -constraints zlib -body {
+ zlib push compress $outSide -dictionary $dict
+ fconfigure $outSide -blocking 0 -translation binary -buffering none
+ fconfigure $inSide -blocking 0 -translation binary
+ puts -nonewline $outSide $msg
+ chan pop $outSide
+ string length [read $inSide]
+} -cleanup {
+ catch {close $outSide}
+ catch {close $inSide}
+} -result 103
test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
set sfile [makeFile {} testsrc.gz]