summaryrefslogtreecommitdiffstats
path: root/tests/http.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-01 02:29:21 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-01 02:29:21 (GMT)
commitf211b4e55ee58981446b46e61f4702f72debe32a (patch)
tree4013ba176f77d97263c96b559735522ac72cf6c3 /tests/http.test
parent3778d78fa0369f91e4b2b4f0e502745be8eecb65 (diff)
downloadtcl-f211b4e55ee58981446b46e61f4702f72debe32a.zip
tcl-f211b4e55ee58981446b46e61f4702f72debe32a.tar.gz
tcl-f211b4e55ee58981446b46e61f4702f72debe32a.tar.bz2
* Fixed [makeFile] and [viewFile] to accurately reflect a file's
contents. Updated tests that depended on buggy behavior. Also added warning messages to "-debug 1" operations to debug test calls to (make|remove)(File|Directory).
Diffstat (limited to 'tests/http.test')
-rw-r--r--tests/http.test21
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