diff options
author | dgp <dgp@users.sourceforge.net> | 2017-08-03 14:40:48 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-08-03 14:40:48 (GMT) |
commit | 1ad27f0d877fb2629821863e4c85a764814b9f32 (patch) | |
tree | de947ecc50b0012cf6d8951ce9ee525c2d704b14 /tests/httpold.test | |
parent | e0f9bcfae392844b48282ffca922a2e4b28aa314 (diff) | |
parent | c5d2a041f09785727fad67a457ca2b28aecefe82 (diff) | |
download | tcl-1ad27f0d877fb2629821863e4c85a764814b9f32.zip tcl-1ad27f0d877fb2629821863e4c85a764814b9f32.tar.gz tcl-1ad27f0d877fb2629821863e4c85a764814b9f32.tar.bz2 |
merge 8.6
Diffstat (limited to 'tests/httpold.test')
-rw-r--r-- | tests/httpold.test | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/httpold.test b/tests/httpold.test index 5995bed..e63bcda 100644 --- a/tests/httpold.test +++ b/tests/httpold.test @@ -33,6 +33,13 @@ if {[catch {package require http 1.0}]} { } } +if {$::tcl_platform(os) eq "Darwin"} { + # Name resolution often a problem on OSX; not focus of HTTP package anyway + set HOST localhost +} else { + set HOST [info hostname] +} + set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null" catch {unset data} @@ -85,7 +92,7 @@ test httpold-3.2 {http_get} { set err } {Unsupported URL: http:junk} -set url [info hostname]:$port +set url ${::HOST}:$port test httpold-3.3 {http_get} { set token [http_get $url] http_data $token @@ -95,8 +102,8 @@ test httpold-3.3 {http_get} { </body></html>" set tail /a/b/c -set url [info hostname]:$port/a/b/c -set binurl [info hostname]:$port/binary +set url ${::HOST}:$port/a/b/c +set binurl ${::HOST}:$port/binary test httpold-3.4 {http_get} { set token [http_get $url] @@ -108,7 +115,7 @@ test httpold-3.4 {http_get} { proc selfproxy {host} { global port - return [list [info hostname] $port] + return [list ${::HOST} $port] } test httpold-3.5 {http_get} { http_config -proxyfilter selfproxy @@ -273,7 +280,7 @@ test httpold-5.3 {http_formatQuery} { test httpold-6.1 {httpProxyRequired} { update - http_config -proxyhost [info hostname] -proxyport $port + http_config -proxyhost ${::HOST} -proxyport $port set token [http_get $url] http_wait $token http_config -proxyhost {} -proxyport {} |