diff options
Diffstat (limited to 'tests/http.test')
-rw-r--r-- | tests/http.test | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/http.test b/tests/http.test index cabfaed..fe76873 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,10 +12,10 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.26 2002/06/22 04:19:47 dgp Exp $ +# RCS: @(#) $Id: http.test,v 1.27 2002/07/01 02:29:22 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { - package require tcltest + package require tcltest 2.1 namespace import -force ::tcltest::* } @@ -223,8 +223,8 @@ test http-3.11 {http::geturl querychannel with -command} { append query $sep$query set sep & } - ::tcltest::makeFile $query outdata - set fp [open outdata] + set file [makeFile $query outdata] + set fp [open $file] proc asyncCB {token} { global postResult @@ -238,14 +238,15 @@ test http-3.11 {http::geturl querychannel with -command} { # Now do async http::cleanup $t close $fp - set fp [open outdata] + set fp [open $file] set t [http::geturl $posturl -querychannel $fp -command asyncCB] set postResult [list PostStart] http::wait $t lappend testRes [http::status $t] $postResult + removeFile outdata set testRes -} {ok 122879 {Got 122880 bytes} ok {PostStart {Got 122880 bytes}}} +} {ok 122879 {Got 122879 bytes} ok {PostStart {Got 122879 bytes}}} # On Linux platforms when the client and server are on the same # host, the client is unable to read the server's response one @@ -264,8 +265,8 @@ test http-3.12 {http::geturl querychannel with aborted request} {nonPortable} { append query $sep$query set sep & } - ::tcltest::makeFile $query outdata - set fp [open outdata] + set file [makeFile $query outdata] + set fp [open $file] proc asyncCB {token} { global postResult @@ -288,6 +289,7 @@ test http-3.12 {http::geturl querychannel with aborted request} {nonPortable} { error $err } + removeFile outdata list [http::status $t] [http::code $t] } {ok {HTTP/1.0 200 Data follows}} @@ -487,8 +489,5 @@ if {[info exists httpthread]} { if {[info exist removeHttpd]} { removeFile $httpdFile } -foreach file [list outdata] { - catch {::tcltest::removeFile $file} -} ::tcltest::cleanupTests |