blob: 7159114324c41b87f8d0c1eb179228e4da1d31e0 [file] [log] [blame]
# $Id$
set testfilename1 binary.rvt
set binaryfile AngeloFish.jpg
::tcltest::test binary-1.1 {binary data test} {
set page [ ::http::geturl "${urlbase}$testfilename1?test1=1" ]
set fl [open $binaryfile r]
fconfigure $fl -translation binary
fconfigure $fl -encoding binary
set ret [string equal -length 42746 [::http::data $page] [read $fl]]
close $fl
set ret
} 1
::tcltest::test binary-2.1 {binary data test with 'include'} {
set page [ ::http::geturl "${urlbase}$testfilename1?test2=1" ]
set fl [open $binaryfile r]
fconfigure $fl -translation binary
fconfigure $fl -encoding binary
set ret [string equal -length 42746 [::http::data $page] [read $fl]]
close $fl
set ret
} 1