summaryrefslogtreecommitdiffstats
path: root/tests/zlib.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-06-05 16:50:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-06-05 16:50:52 (GMT)
commitdc3657b1b7d4d243084c3d11d2ddf5ff47135ebc (patch)
tree5ba1a872ee13097c5b0ffc00a36071620475e015 /tests/zlib.test
parentc4e779ece448364066a7669b7040a9bdbcc632a9 (diff)
downloadtcl-dc3657b1b7d4d243084c3d11d2ddf5ff47135ebc.zip
tcl-dc3657b1b7d4d243084c3d11d2ddf5ff47135ebc.tar.gz
tcl-dc3657b1b7d4d243084c3d11d2ddf5ff47135ebc.tar.bz2
more test tinkering
Diffstat (limited to 'tests/zlib.test')
-rw-r--r--tests/zlib.test9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index cc3900d..ba21cd1 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -230,16 +230,19 @@ test zlib-8.8 {transformtion and fconfigure} -setup {
set msg "HTTP/1.0 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nX-Robots-Tag: noarchive\r\nLast-Modified: Tue, 05 Jun 2012 02:43:25 GMT\r\nETag: \"1338864205129|#public|0|en|||0\"\r\nExpires: Tue, 05 Jun 2012 16:17:11 GMT\r\nDate: Tue, 05 Jun 2012 16:17:06 GMT\r\nCache-Control: public, max-age=5\r\nX-Content-Type-Options: nosniff\r\nX-XSS-Protection: 1; mode=block\r\nServer: GSE\r\n"
set dict "optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-languageauthorizationexpectfromhostif-modified-sinceif-matchif-none-matchif-rangeif-unmodifiedsincemax-forwardsproxy-authorizationrangerefererteuser-agent100101200201202203204205206300301302303304305306307400401402403404405406407408409410411412413414415416417500501502503504505accept-rangesageetaglocationproxy-authenticatepublicretry-afterservervarywarningwww-authenticateallowcontent-basecontent-encodingcache-controlconnectiondatetrailertransfer-encodingupgradeviawarningcontent-languagecontent-lengthcontent-locationcontent-md5content-rangecontent-typeetagexpireslast-modifiedset-cookieMondayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSepOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplication/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1.1statusversionurl"
} -constraints zlib -body {
- zlib push deflate $outSide -dictionary $dict
+ 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
- list [string length [zlib deflate $msg]] [string length [read $inSide]]
+ set compressed [read $inSide]
+ catch {zlib decompress $compressed} err opt
+ list [string length [zlib deflate $msg]] [string length $compressed] \
+ $err [dict get $opt -errorcode] [zlib adler32 $dict]
} -cleanup {
catch {close $outSide}
catch {close $inSide}
-} -result {254 212}
+} -result {254 222 {need dictionary} {TCL ZLIB NEED_DICT 2381337010} 2381337010}
test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
set sfile [makeFile {} testsrc.gz]