summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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]