pike.git/
src/
modules/
_Roxen/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2004-01-27
2004-01-27 20:41:47 by Martin Nilsson <mani@lysator.liu.se>
39a701e08be73b370024a09d9157d33b3c794f50 (
31
lines) (+
29
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Tests
Rev: src/modules/_Roxen/testsuite.in:1.3
1:
-
// -*- Pike -*-
+
-
test_eq(_Roxen.html_encode_string (10), "10");
+
test_eq(_Roxen.html_encode_string (
0), "0")
+
test_eq(_Roxen.html_encode_string (""), "")
+
test_eq(_Roxen.html_encode_string (
10), "10")
+
test_eq(_Roxen.html_encode_string("a&b<c>d"), "a&
;
b<c>d")
+
+
test_eq(_Roxen.http_decode_string(""), "")
+
test_eq(_Roxen.http_decode_string("abc+d%20e%41"), "abc+d eA")
+
test_eq(_Roxen.http_decode_string(""), "")
+
test_do(_Roxen.http_decode_string("%"))
+
test_do(_Roxen.http_decode_string("%0"))
+
test_do(_Roxen.http_decode_string("%%"))
+
test_do(_Roxen.http_decode_string("%%%"))
+
test_do(_Roxen.http_decode_string("%41%"))
+
test_do(_Roxen.http_decode_string("%41%0"))
+
test_do(_Roxen.http_decode_string("%41%%"))
+
test_do(_Roxen.http_decode_string("%41%%%"))
+
test_do(_Roxen.http_decode_string("%u"))
+
test_do(_Roxen.http_decode_string("%u0"))
+
test_do(_Roxen.http_decode_string("%u00"))
+
test_do(_Roxen.http_decode_string("%u000"))
+
test_do(_Roxen.http_decode_string("%u000_"))
+
test_do(_Roxen.http_decode_string("%41%u"))
+
test_do(_Roxen.http_decode_string("%41%u0"))
+
test_do(_Roxen.http_decode_string("%41%u00"))
+
test_do(_Roxen.http_decode_string("%41%u000"))
+
test_do(_Roxen.http_decode_string("%41%u000_"))
+
test_eq(_Roxen.http_decode_string("%u12345"), "\x1234""5")
+
test_eq(_Roxen.http_decode_string("%U12345"), "\x1234""5")