summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/url/resources/toascii.json
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/url/resources/toascii.json')
-rw-r--r--testing/web-platform/tests/url/resources/toascii.json176
1 files changed, 176 insertions, 0 deletions
diff --git a/testing/web-platform/tests/url/resources/toascii.json b/testing/web-platform/tests/url/resources/toascii.json
new file mode 100644
index 0000000000..bca28b4a1e
--- /dev/null
+++ b/testing/web-platform/tests/url/resources/toascii.json
@@ -0,0 +1,176 @@
+[
+ "This resource is focused on highlighting issues with UTS #46 ToASCII",
+ {
+ "comment": "Label with hyphens in 3rd and 4th position",
+ "input": "aa--",
+ "output": "aa--"
+ },
+ {
+ "input": "a†--",
+ "output": "xn--a---kp0a"
+ },
+ {
+ "input": "ab--c",
+ "output": "ab--c"
+ },
+ {
+ "comment": "Label with leading hyphen",
+ "input": "-x",
+ "output": "-x"
+ },
+ {
+ "input": "-†",
+ "output": "xn----xhn"
+ },
+ {
+ "input": "-x.xn--zca",
+ "output": "-x.xn--zca"
+ },
+ {
+ "input": "-x.ß",
+ "output": "-x.xn--zca"
+ },
+ {
+ "comment": "Label with trailing hyphen",
+ "input": "x-.xn--zca",
+ "output": "x-.xn--zca"
+ },
+ {
+ "input": "x-.ß",
+ "output": "x-.xn--zca"
+ },
+ {
+ "comment": "Empty labels",
+ "input": "x..xn--zca",
+ "output": "x..xn--zca"
+ },
+ {
+ "input": "x..ß",
+ "output": "x..xn--zca"
+ },
+ {
+ "comment": "Invalid Punycode",
+ "input": "xn--a",
+ "output": null
+ },
+ {
+ "input": "xn--a.xn--zca",
+ "output": null
+ },
+ {
+ "input": "xn--a.ß",
+ "output": null
+ },
+ {
+ "input": "xn--ls8h=",
+ "output": null
+ },
+ {
+ "comment": "Invalid Punycode (contains non-ASCII character)",
+ "input": "xn--tešla",
+ "output": null
+ },
+ {
+ "comment": "Valid Punycode",
+ "input": "xn--zca.xn--zca",
+ "output": "xn--zca.xn--zca"
+ },
+ {
+ "comment": "Mixed",
+ "input": "xn--zca.ß",
+ "output": "xn--zca.xn--zca"
+ },
+ {
+ "input": "ab--c.xn--zca",
+ "output": "ab--c.xn--zca"
+ },
+ {
+ "input": "ab--c.ß",
+ "output": "ab--c.xn--zca"
+ },
+ {
+ "comment": "CheckJoiners is true",
+ "input": "\u200D.example",
+ "output": null
+ },
+ {
+ "input": "xn--1ug.example",
+ "output": null
+ },
+ {
+ "comment": "CheckBidi is true",
+ "input": "يa",
+ "output": null
+ },
+ {
+ "input": "xn--a-yoc",
+ "output": null
+ },
+ {
+ "comment": "processing_option is Nontransitional_Processing",
+ "input": "ශ්‍රී",
+ "output": "xn--10cl1a0b660p"
+ },
+ {
+ "input": "نامه‌ای",
+ "output": "xn--mgba3gch31f060k"
+ },
+ {
+ "comment": "U+FFFD",
+ "input": "\uFFFD.com",
+ "output": null
+ },
+ {
+ "comment": "U+FFFD character encoded in Punycode",
+ "input": "xn--zn7c.com",
+ "output": null
+ },
+ {
+ "comment": "Label longer than 63 code points",
+ "input": "x01234567890123456789012345678901234567890123456789012345678901x",
+ "output": "x01234567890123456789012345678901234567890123456789012345678901x"
+ },
+ {
+ "input": "x01234567890123456789012345678901234567890123456789012345678901†",
+ "output": "xn--x01234567890123456789012345678901234567890123456789012345678901-6963b"
+ },
+ {
+ "input": "x01234567890123456789012345678901234567890123456789012345678901x.xn--zca",
+ "output": "x01234567890123456789012345678901234567890123456789012345678901x.xn--zca"
+ },
+ {
+ "input": "x01234567890123456789012345678901234567890123456789012345678901x.ß",
+ "output": "x01234567890123456789012345678901234567890123456789012345678901x.xn--zca"
+ },
+ {
+ "comment": "Domain excluding TLD longer than 253 code points",
+ "input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.x",
+ "output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.x"
+ },
+ {
+ "input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--zca",
+ "output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--zca"
+ },
+ {
+ "input": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.ß",
+ "output": "01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.01234567890123456789012345678901234567890123456789.0123456789012345678901234567890123456789012345678.xn--zca"
+ },
+ {
+ "comment": "IDNA ignored code points",
+ "input": "a\u00ADb",
+ "output": "ab"
+ },
+ {
+ "comment": "Interesting UseSTD3ASCIIRules=false cases",
+ "input": "≠",
+ "output": "xn--1ch"
+ },
+ {
+ "input": "≮",
+ "output": "xn--gdh"
+ },
+ {
+ "input": "≯",
+ "output": "xn--hdh"
+ }
+]