summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-06-09 23:15:51 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-06-09 23:15:51 (GMT)
commit13c5b8cf121d2e55d4d9e4a34bcc9d8e08d99e65 (patch)
treef2b54e5c1247d547ba391decbfffae55c8bf3ed6 /tests
parent8f7427729b4a792c9c2461dd4218643694863cf8 (diff)
downloadtcl-13c5b8cf121d2e55d4d9e4a34bcc9d8e08d99e65.zip
tcl-13c5b8cf121d2e55d4d9e4a34bcc9d8e08d99e65.tar.gz
tcl-13c5b8cf121d2e55d4d9e4a34bcc9d8e08d99e65.tar.bz2
more cross-testing of dictionary-powered compression; describe package configuration
Diffstat (limited to 'tests')
-rw-r--r--tests/zlib.test58
1 files changed, 56 insertions, 2 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index 9058817..e63bd84 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -23,6 +23,9 @@ test zlib-1.1 {zlib basics} -constraints zlib -returnCodes error -body {
test zlib-1.2 {zlib basics} -constraints zlib -returnCodes error -body {
zlib ? {}
} -result {bad command "?": must be adler32, compress, crc32, decompress, deflate, gunzip, gzip, inflate, push, or stream}
+test zlib-1.3 {zlib basics} -constraints zlib -body {
+ zlib::pkgconfig list
+} -result zlibVersion
test zlib-2.1 {zlib compress/decompress} zlib {
zlib decompress [zlib compress abcdefghijklm]
@@ -252,14 +255,15 @@ test zlib-8.9 {transformtion and fconfigure} -setup {
fconfigure $outSide -blocking 0 -translation binary -buffering none
fconfigure $inSide -blocking 0 -translation binary
puts -nonewline $outSide $spdyHeaders
+ set result [fconfigure $outSide -checksum]
chan pop $outSide
$strm put -dictionary $spdyDict [read $inSide]
- list [string length $spdyHeaders] [string length [$strm get]]
+ lappend result [string length $spdyHeaders] [string length [$strm get]]
} -cleanup {
catch {close $outSide}
catch {close $inSide}
catch {$strm close}
-} -result {358 358}
+} -result {3064818174 358 358}
test zlib-8.10 {transformtion and fconfigure} -setup {
lassign [chan pipe] inSide outSide
} -constraints zlib -body {
@@ -303,6 +307,56 @@ test zlib-8.12 {transformtion and fconfigure} -setup {
fconfigure $inSide -translation binary -dictionary $spdyDict
puts -nonewline $outSide [$strm get]
close $outSide
+ list [string length $spdyHeaders] [string length [read $inSide]] \
+ [fconfigure $inSide -checksum]
+} -cleanup {
+ catch {close $outSide}
+ catch {close $inSide}
+ catch {$strm close}
+} -result {358 358 3064818174}
+test zlib-8.13 {transformtion and fconfigure} -setup {
+ lassign [chan pipe] inSide outSide
+ set strm [zlib stream compress]
+} -constraints zlib -body {
+ $strm put -dictionary $spdyDict -finalize $spdyHeaders
+ zlib push decompress $inSide -dictionary $spdyDict
+ fconfigure $outSide -blocking 0 -translation binary
+ fconfigure $inSide -translation binary
+ puts -nonewline $outSide [$strm get]
+ close $outSide
+ list [string length $spdyHeaders] [string length [read $inSide]] \
+ [fconfigure $inSide -checksum]
+} -cleanup {
+ catch {close $outSide}
+ catch {close $inSide}
+ catch {$strm close}
+} -result {358 358 3064818174}
+test zlib-8.14 {transformtion and fconfigure} -setup {
+ lassign [chan pipe] inSide outSide
+ set strm [zlib stream deflate]
+} -constraints zlib -body {
+ $strm put -finalize -dictionary $spdyDict $spdyHeaders
+ zlib push inflate $inSide
+ fconfigure $outSide -blocking 0 -buffering none -translation binary
+ fconfigure $inSide -translation binary -dictionary $spdyDict
+ puts -nonewline $outSide [$strm get]
+ close $outSide
+ list [string length $spdyHeaders] [string length [read $inSide]]
+} -cleanup {
+ catch {close $outSide}
+ catch {close $inSide}
+ catch {$strm close}
+} -result {358 358}
+test zlib-8.15 {transformtion and fconfigure} -setup {
+ lassign [chan pipe] inSide outSide
+ set strm [zlib stream deflate]
+} -constraints zlib -body {
+ $strm put -finalize -dictionary $spdyDict $spdyHeaders
+ zlib push inflate $inSide -dictionary $spdyDict
+ fconfigure $outSide -blocking 0 -buffering none -translation binary
+ fconfigure $inSide -translation binary
+ puts -nonewline $outSide [$strm get]
+ close $outSide
list [string length $spdyHeaders] [string length [read $inSide]]
} -cleanup {
catch {close $outSide}