summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-08-20 14:14:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-08-20 14:14:00 (GMT)
commit56ab72d069fc6871ecfd285bb07e4670bcc5db4a (patch)
tree7a0312e58d298d09068fef5d9311e409cd47f771 /tests
parent23754cbbc81ac0eda71610fe3737a8bc8ae31c65 (diff)
parenteb9bcac9c6ae30bb3e5f6bc298ee8238927a93e1 (diff)
downloadtcl-56ab72d069fc6871ecfd285bb07e4670bcc5db4a.zip
tcl-56ab72d069fc6871ecfd285bb07e4670bcc5db4a.tar.gz
tcl-56ab72d069fc6871ecfd285bb07e4670bcc5db4a.tar.bz2
merge trunk
Diffstat (limited to 'tests')
-rw-r--r--tests/http.test16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/http.test b/tests/http.test
index fe44b47..bde5795 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -392,11 +392,19 @@ Content-Type {text/plain;charset=utf-8}
Accept-Encoding .*
Content-Length 5}
test http-3.29 "http::geturl $ipv6url" -body {
- set token [http::geturl $ipv6url -validate 1]
- http::code $token
+ # We only want to see if the URL gets parsed correctly. This is
+ # the case if http::geturl succeeds or returns a socket related
+ # error. If the parsing is wrong, we'll get a parse error.
+ # It'd be better to separate the URL parser from http::geturl, so
+ # that it can be tested without also trying to make a connection.
+ set error [catch {http::geturl $ipv6url -validate 1} token]
+ if {$error && [string match "couldn't open socket: *" $token]} {
+ set error 0
+ }
+ set error
} -cleanup {
- http::cleanup $token
-} -result "HTTP/1.0 200 OK"
+ catch { http::cleanup $token }
+} -result 0
test http-4.1 {http::Event} -body {
set token [http::geturl $url -keepalive 0]