pike.git
/
lib
/
modules
/
Standards.pmod
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Standards.pmod/testsuite.in:121:
test_eq((string)Standards.URI("<a@example.com>", "mailto:"), "mailto:<a@example.com>") // Some tests of empty path followed by a query. test_eq(Standards.URI("http://user:??@host?query")->query, "query") test_eq(Standards.URI("http://user:??@host?query")->user, "user") test_eq(Standards.URI("http://user:??@host?query")->password, "??") test_eq(Standards.URI("http://user:??@host?query")->path, "") test_eq(Standards.URI("HTTP://WWW.COM/")->scheme, "http") // test `== test_true(Standards.URI("a://b:c@d:1/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h"))
+
test_true(Standards.URI("a://b:c@d:1/e?f=g&h#i")==
+
Standards.URI("a://b:c@d:1/e?f=g&h#i"))
test_true(Standards.URI("A://b:c@D:01/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("x://b:c@d:1/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("a://x:c@d:1/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("a://b:x@d:1/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("a://b:c@x:1/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("a://b:c@d:2/e?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("a://b:c@d:1/x?f=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h")) test_false(Standards.URI("a://b:c@d:1/e?x=g&h")== Standards.URI("a://b:c@d:1/e?f=g&h"))
-
+
test_false(Standards.URI("a://b:c@d:1/e?f=g&h#i")==
+
Standards.URI("a://b:c@d:1/e?f=g&h#I"))
// codec
-
test_true(decode_value(encode_value(Standards.URI("a://b:c@d:1/e?f=g&h")))==
-
Standards.URI("a://b:c@d:1/e?f=g&h"))
+
test_true(decode_value(encode_value(Standards.URI("a://b:c@d:1/e?f=g&h
#i
")))==
+
Standards.URI("a://b:c@d:1/e?f=g&h
#i
"))
+
test_true(Standards.URI(Standards.URI("a://b:c@d:1/e?f=g&h#i"))==
+
Standards.URI("a://b:c@d:1/e?f=g&h#i"))
-
+
test_eval_error(Standards.URI("")) test_eval_error(Standards.URI("#foo")) test_eval_error(Standards.URI("/foo")) test_eval_error(Standards.URI("x_x:")) // - Standards.IDNA define([[test_punycode]], [[ test_eq([[Standards.IDNA.Punycode.encode($1)]], [[$2]]) test_eq([[Standards.IDNA.Punycode.decode($2)]], [[$1]])