summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-06-05 16:25:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-06-05 16:25:29 (GMT)
commit7be9fc1d1b852e4acfcb37a711374be1f4712411 (patch)
tree2fc9e202d0a71d1b3572982845667cd1d38b19e0
parente6d8763bc8e167637a136b863e0728665471eff3 (diff)
downloadtcl-7be9fc1d1b852e4acfcb37a711374be1f4712411.zip
tcl-7be9fc1d1b852e4acfcb37a711374be1f4712411.tar.gz
tcl-7be9fc1d1b852e4acfcb37a711374be1f4712411.tar.bz2
better test that dictionaries work
-rw-r--r--tests/zlib.test12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/zlib.test b/tests/zlib.test
index 642b2a4..cc3900d 100644
--- a/tests/zlib.test
+++ b/tests/zlib.test
@@ -225,19 +225,21 @@ test zlib-8.7 {transformation and fconfigure} -setup {
} -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.8 {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 "
+ # Input is headers from fetching SPDY draft
+ # Dictionary is that which is proposed _in_ SPDY draft
+ 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 compress $outSide -dictionary $dict
+ zlib push deflate $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]
+ list [string length [zlib deflate $msg]] [string length [read $inSide]]
} -cleanup {
catch {close $outSide}
catch {close $inSide}
-} -result 103
+} -result {254 212}
test zlib-9.1 "check fcopy with push" -constraints zlib -setup {
set sfile [makeFile {} testsrc.gz]