summaryrefslogtreecommitdiffstats
path: root/tests/http.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/http.test')
-rw-r--r--tests/http.test50
1 files changed, 25 insertions, 25 deletions
diff --git a/tests/http.test b/tests/http.test
index ff9fb78..2fd5af4 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -42,7 +42,7 @@ proc bgerror {args} {
# Name resolution is often a problem on OSX; not focus of HTTP package anyway.
# Also a problem on other platforms for http-4.14 (test with bad port number).
set HOST localhost
-set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null"
+set bindata "This is binary data\x0D\x0Amore\x0Dmore\x0Amore\x00null"
catch {unset data}
# Ensure httpd file exists
@@ -620,12 +620,12 @@ test http-5.3 {http::formatQuery} {
http::formatQuery lines "line1\nline2\nline3"
} {lines=line1%0D%0Aline2%0D%0Aline3}
test http-5.4 {http::formatQuery} {
- http::formatQuery name1 ~bwelch name2 \xa1\xa2\xa2
+ http::formatQuery name1 ~bwelch name2 ¡¢¢
} {name1=~bwelch&name2=%C2%A1%C2%A2%C2%A2}
test http-5.5 {http::formatQuery} {
set enc [http::config -urlencoding]
http::config -urlencoding iso8859-1
- set res [http::formatQuery name1 ~bwelch name2 \xa1\xa2\xa2]
+ set res [http::formatQuery name1 ~bwelch name2 ¡¢¢]
http::config -urlencoding $enc
set res
} {name1=~bwelch&name2=%A1%A2%A2}
@@ -650,24 +650,24 @@ test http-7.1 {http::mapReply} {
test http-7.2 {http::mapReply} {
# RFC 2718 specifies that we pass urlencoding on utf-8 chars by default,
# so make sure this gets converted to utf-8 then urlencoded.
- http::mapReply "\u2208"
+ http::mapReply "∈"
} {%E2%88%88}
test http-7.3 {http::formatQuery} -setup {
set enc [http::config -urlencoding]
} -returnCodes error -body {
# this would be reverting to http <=2.4 behavior
http::config -urlencoding ""
- http::mapReply "\u2208"
+ http::mapReply "∈"
} -cleanup {
http::config -urlencoding $enc
-} -result "can't read \"formMap(\u2208)\": no such element in array"
+} -result "can't read \"formMap(∈)\": no such element in array"
test http-7.4 {http::formatQuery} -setup {
set enc [http::config -urlencoding]
} -body {
# this would be reverting to http <=2.4 behavior w/o errors
# (unknown chars become '?')
http::config -urlencoding "iso8859-1"
- http::mapReply "\u2208"
+ http::mapReply "∈"
} -cleanup {
http::config -urlencoding $enc
} -result {%3F}
@@ -715,37 +715,37 @@ test http-idna-2.1 {puny encode: functional test} {
::tcl::idna puny encode abc
} abc-
test http-idna-2.2 {puny encode: functional test} {
- ::tcl::idna puny encode a\u20acb\u20acc
+ ::tcl::idna puny encode a€b€c
} abc-k50ab
test http-idna-2.3 {puny encode: functional test} {
::tcl::idna puny encode ABC
} ABC-
test http-idna-2.4 {puny encode: functional test} {
- ::tcl::idna puny encode A\u20ACB\u20ACC
+ ::tcl::idna puny encode A€B€C
} ABC-k50ab
test http-idna-2.5 {puny encode: functional test} {
::tcl::idna puny encode ABC 0
} abc-
test http-idna-2.6 {puny encode: functional test} {
- ::tcl::idna puny encode A\u20ACB\u20ACC 0
+ ::tcl::idna puny encode A€B€C 0
} abc-k50ab
test http-idna-2.7 {puny encode: functional test} {
::tcl::idna puny encode ABC 1
} ABC-
test http-idna-2.8 {puny encode: functional test} {
- ::tcl::idna puny encode A\u20ACB\u20ACC 1
+ ::tcl::idna puny encode A€B€C 1
} ABC-k50ab
test http-idna-2.9 {puny encode: functional test} {
::tcl::idna puny encode abc 0
} abc-
test http-idna-2.10 {puny encode: functional test} {
- ::tcl::idna puny encode a\u20ACb\u20ACc 0
+ ::tcl::idna puny encode a€b€c 0
} abc-k50ab
test http-idna-2.11 {puny encode: functional test} {
::tcl::idna puny encode abc 1
} ABC-
test http-idna-2.12 {puny encode: functional test} {
- ::tcl::idna puny encode a\u20ACb\u20ACc 1
+ ::tcl::idna puny encode a€b€c 1
} ABC-k50ab
test http-idna-2.13 {puny encode: edge cases} {
::tcl::idna puny encode ""
@@ -875,43 +875,43 @@ test http-idna-3.1 {puny decode: functional test} {
} abc
test http-idna-3.2 {puny decode: functional test} {
::tcl::idna puny decode abc-k50ab
-} a\u20acb\u20acc
+} a€b€c
test http-idna-3.3 {puny decode: functional test} {
::tcl::idna puny decode ABC-
} ABC
test http-idna-3.4 {puny decode: functional test} {
::tcl::idna puny decode ABC-k50ab
-} A\u20ACB\u20ACC
+} A€B€C
test http-idna-3.5 {puny decode: functional test} {
::tcl::idna puny decode ABC-K50AB
-} A\u20ACB\u20ACC
+} A€B€C
test http-idna-3.6 {puny decode: functional test} {
::tcl::idna puny decode abc-K50AB
-} a\u20ACb\u20ACc
+} a€b€c
test http-idna-3.7 {puny decode: functional test} {
::tcl::idna puny decode ABC- 0
} abc
test http-idna-3.8 {puny decode: functional test} {
::tcl::idna puny decode ABC-K50AB 0
-} a\u20ACb\u20ACc
+} a€b€c
test http-idna-3.9 {puny decode: functional test} {
::tcl::idna puny decode ABC- 1
} ABC
test http-idna-3.10 {puny decode: functional test} {
::tcl::idna puny decode ABC-K50AB 1
-} A\u20ACB\u20ACC
+} A€B€C
test http-idna-3.11 {puny decode: functional test} {
::tcl::idna puny decode abc- 0
} abc
test http-idna-3.12 {puny decode: functional test} {
::tcl::idna puny decode abc-k50ab 0
-} a\u20ACb\u20ACc
+} a€b€c
test http-idna-3.13 {puny decode: functional test} {
::tcl::idna puny decode abc- 1
} ABC
test http-idna-3.14 {puny decode: functional test} {
::tcl::idna puny decode abc-k50ab 1
-} A\u20ACB\u20ACC
+} A€B€C
test http-idna-3.15 {puny decode: edge cases and errors} {
# Is this case actually correct?
binary encode hex [encoding convertto utf-8 [::tcl::idna puny decode abc]]
@@ -1045,16 +1045,16 @@ test http-idna-4.1 {IDNA encoding} {
::tcl::idna encode abc.def
} abc.def
test http-idna-4.2 {IDNA encoding} {
- ::tcl::idna encode a\u20acb\u20acc.def
+ ::tcl::idna encode a€b€c.def
} xn--abc-k50ab.def
test http-idna-4.3 {IDNA encoding} {
- ::tcl::idna encode def.a\u20acb\u20acc
+ ::tcl::idna encode def.a€b€c
} def.xn--abc-k50ab
test http-idna-4.4 {IDNA encoding} {
::tcl::idna encode ABC.DEF
} ABC.DEF
test http-idna-4.5 {IDNA encoding} {
- ::tcl::idna encode A\u20acB\u20acC.def
+ ::tcl::idna encode A€B€C.def
} xn--ABC-k50ab.def
test http-idna-4.6 {IDNA encoding: invalid edge case} {
# Should this be an error?
@@ -1084,7 +1084,7 @@ test http-idna-4.9.1 {IDNA encoding: max lengths from RFC 5890} {
} {IDNA OVERLONG_PART xn--989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c}
unset overlong
test http-idna-4.10 {IDNA encoding: edge cases} {
- ::tcl::idna encode pass\u00e9.example.com
+ ::tcl::idna encode passé.example.com
} xn--pass-epa.example.com
test http-idna-5.1 {IDNA decoding} {