diff options
Diffstat (limited to 'testing/web-platform/tests/url')
44 files changed, 24037 insertions, 0 deletions
diff --git a/testing/web-platform/tests/url/IdnaTestV2.window.js b/testing/web-platform/tests/url/IdnaTestV2.window.js new file mode 100644 index 0000000000..8873886bda --- /dev/null +++ b/testing/web-platform/tests/url/IdnaTestV2.window.js @@ -0,0 +1,41 @@ +promise_test(() => fetch("resources/IdnaTestV2.json").then(res => res.json()).then(runTests), "Loading data…"); + +// Performance impact of this seems negligible (performance.now() diff in WebKit went from 48 to 52) +// and there was a preference to let more non-ASCII hit the parser. +function encodeHostEndingCodePoints(input) { + let output = ""; + for (const codePoint of input) { + if ([":", "/", "?", "#", "\\"].includes(codePoint)) { + output += encodeURIComponent(codePoint); + } else { + output += codePoint; + } + } + return output; +} + +function runTests(idnaTests) { + for (const idnaTest of idnaTests) { + if (typeof idnaTest === "string") { + continue // skip comments + } + if (idnaTest.input === "") { + continue // cannot test empty string input through new URL() + } + // Percent-encode the input such that ? and equivalent code points do not end up counting as + // part of the URL, but are parsed through the host parser instead. + const encodedInput = encodeHostEndingCodePoints(idnaTest.input); + + test(() => { + if (idnaTest.output === null) { + assert_throws_js(TypeError, () => new URL(`https://${encodedInput}/x`)); + } else { + const url = new URL(`https://${encodedInput}/x`); + assert_equals(url.host, idnaTest.output); + assert_equals(url.hostname, idnaTest.output); + assert_equals(url.pathname, "/x"); + assert_equals(url.href, `https://${idnaTest.output}/x`); + } + }, `ToASCII("${idnaTest.input}")${idnaTest.comment ? " " + idnaTest.comment : ""}`); + } +} diff --git a/testing/web-platform/tests/url/META.yml b/testing/web-platform/tests/url/META.yml new file mode 100644 index 0000000000..094b266b64 --- /dev/null +++ b/testing/web-platform/tests/url/META.yml @@ -0,0 +1,7 @@ +spec: https://url.spec.whatwg.org/ +suggested_reviewers: + - mikewest + - domenic + - annevk + - GPHemsley + - TimothyGu diff --git a/testing/web-platform/tests/url/README.md b/testing/web-platform/tests/url/README.md new file mode 100644 index 0000000000..fa5e3b0dc7 --- /dev/null +++ b/testing/web-platform/tests/url/README.md @@ -0,0 +1,55 @@ +## urltestdata.json + +`resources/urltestdata.json` contains URL parsing tests suitable for any URL parser implementation. + +It's used as a source of tests by `a-element.html`, `failure.html`, `url-constructor.any.js`, and +other test files in this directory. + +The format of `resources/urltestdata.json` is a JSON array of comments as strings and test cases as +objects. The keys for each test case are: + +* `input`: a string to be parsed as URL. +* `base`: null or a serialized URL (i.e., does not fail parsing). +* Then either + + * `failure` whose value is `true`, indicating that parsing `input` relative to `base` returns + failure + * `relativeTo` whose value is "`non-opaque-path-base`" (input does parse against a non-null base + URL without an opaque path) or "`any-base`" (input parses against any non-null base URL), or is + omitted in its entirety (input never parses successfully) + + or `href`, `origin`, `protocol`, `username`, `password`, `host`, `hostname`, `port`, + `pathname`, `search`, and `hash` with string values; indicating that parsing `input` should return + an URL record and that the getters of each corresponding attribute in that URL’s [API] should + return the corresponding value. + + The `origin` key may be missing. In that case, the API’s `origin` attribute is not tested. + +## setters_tests.json + +`resources/setters_tests.json` is self-documented. + +## toascii.json + +`resources/toascii.json` is a JSON resource containing an array where each item is an object +consisting of an optional `comment` field and mandatory `input` and `output` fields. `input` is the +domain to be parsed according to the rules of UTS #46 (as stipulated by the URL Standard). `output` +gives the expected output of the parser after serialization. An `output` of `null` means parsing is +expected to fail. + +## URL parser's encoding argument + +Tests in `/encoding` and `/html/infrastructure/urls/resolving-urls/query-encoding/` cover the +encoding argument to the URL parser. + +There's also limited coverage in `resources/percent-encoding.json` for percent-encode after encoding +with _percentEncodeSet_ set to special-query percent-encode set and _spaceAsPlus_ set to false. +(Improvements to expand coverage here are welcome.) + +## Specification + +The tests in this directory assert conformance with [the URL Standard][URL]. + +[parsing]: https://url.spec.whatwg.org/#concept-basic-url-parser +[API]: https://url.spec.whatwg.org/#api +[URL]: https://url.spec.whatwg.org/ diff --git a/testing/web-platform/tests/url/a-element-origin-xhtml.xhtml b/testing/web-platform/tests/url/a-element-origin-xhtml.xhtml new file mode 100644 index 0000000000..effcf04bee --- /dev/null +++ b/testing/web-platform/tests/url/a-element-origin-xhtml.xhtml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>URL Test</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <base id="base"/> + </head> + <body> + <div id="log"></div> + <script src="resources/a-element-origin.js"></script> + </body> +</html> +<!-- Other dependencies: resources/urltestdata.json --> diff --git a/testing/web-platform/tests/url/a-element-origin.html b/testing/web-platform/tests/url/a-element-origin.html new file mode 100644 index 0000000000..9cc8e94cbe --- /dev/null +++ b/testing/web-platform/tests/url/a-element-origin.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<base id=base> +<div id=log></div> +<script src=resources/a-element-origin.js></script> +<!-- Other dependencies: resources/urltestdata.json --> diff --git a/testing/web-platform/tests/url/a-element-xhtml.xhtml b/testing/web-platform/tests/url/a-element-xhtml.xhtml new file mode 100644 index 0000000000..05bec4ce4b --- /dev/null +++ b/testing/web-platform/tests/url/a-element-xhtml.xhtml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>URL Test</title> + <meta name="variant" content="?include=file"/> + <meta name="variant" content="?include=javascript"/> + <meta name="variant" content="?include=mailto"/> + <meta name="variant" content="?exclude=(file|javascript|mailto)"/> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/subset-tests-by-key.js"></script> + <base id="base"/> + </head> + <body> + <div id="log"></div> + <script src="resources/a-element.js"></script> + </body> +</html> +<!-- Other dependencies: resources/urltestdata.json --> diff --git a/testing/web-platform/tests/url/a-element.html b/testing/web-platform/tests/url/a-element.html new file mode 100644 index 0000000000..3429e07ec3 --- /dev/null +++ b/testing/web-platform/tests/url/a-element.html @@ -0,0 +1,13 @@ +<!doctype html> +<meta charset=utf-8> +<meta name="variant" content="?include=file"> +<meta name="variant" content="?include=javascript"> +<meta name="variant" content="?include=mailto"> +<meta name="variant" content="?exclude=(file|javascript|mailto)"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="/common/subset-tests-by-key.js"></script> +<base id=base> +<div id=log></div> +<script src=resources/a-element.js></script> +<!-- Other dependencies: resources/urltestdata.json --> diff --git a/testing/web-platform/tests/url/data-uri-fragment.html b/testing/web-platform/tests/url/data-uri-fragment.html new file mode 100644 index 0000000000..e77d96f03d --- /dev/null +++ b/testing/web-platform/tests/url/data-uri-fragment.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Data URI parsing of fragments</title> +<link rel="help" href="https://url.spec.whatwg.org/"> +<meta name="assert" content="Fragments should not be included as part of a data URI's body"> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<iframe id="iframe"></iframe> + +<script> +const IFRAME_DATA_SRC = `data:text/html, + <style>:target { color: green; }<\/style> + <script>window.addEventListener('load', function() { + const data = { + foo_matches_target_selector: document.getElementById('foo').matches(':target'), + body_html: document.body.innerHTML, + }; + parent.postMessage(data, '*'); + });<\/script> + <p id="foo">This should be the only visible text.</p>#foo`.replace('\n', ''); + +async_test(function(t) { + window.addEventListener("message", t.step_func_done(function(event) { + assert_true(event.data.foo_matches_target_selector); + assert_equals(event.data.body_html, + '<p id="foo">This should be the only visible text.</p>'); + })); + + const iframe = document.getElementById("iframe"); + iframe.src = IFRAME_DATA_SRC; +}); +</script> diff --git a/testing/web-platform/tests/url/failure.html b/testing/web-platform/tests/url/failure.html new file mode 100644 index 0000000000..e61f462f97 --- /dev/null +++ b/testing/web-platform/tests/url/failure.html @@ -0,0 +1,58 @@ +<!doctype html> +<meta charset=utf-8> +<title>Test URL parser failure consistency</title> +<meta name=timeout content=long> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<div id=log></div> +<script> +promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runTests), "Loading data…") + +function runTests(testData) { + for (const test of testData) { + + // skip comments, inputs we expect to pass and relative URLs + if (typeof test === "string" || !test.failure || test.base !== null) { + continue; + } + + const name = test.input + " should throw" + + self.test(() => { + // URL's constructor's first argument is tested by url-constructor.html + // If a URL fails to parse with any valid base, it must also fail to parse with no base, i.e. + // when used as a base URL itself. + assert_throws_js(TypeError, () => new URL("about:blank", test.input)); + }, "URL's constructor's base argument: " + name) + + self.test(() => { + const url = new URL("about:blank") + assert_throws_js(TypeError, () => url.href = test.input) + }, "URL's href: " + name) + + // The following use cases resolve the URL input relative to the current + // document's URL. If this test input could be construed as a valid URL + // when resolved against a base URL, skip these cases. + if (test.relativeTo === undefined) { + self.test(() => { + const client = new XMLHttpRequest() + assert_throws_dom("SyntaxError", () => client.open("GET", test.input)) + }, "XHR: " + name) + + self.test(() => { + assert_throws_js(TypeError, () => self.navigator.sendBeacon(test.input)) + }, "sendBeacon(): " + name) + + self.test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + assert_throws_dom("SyntaxError", frame.contentWindow.DOMException, () => frame.contentWindow.location = test.input); + }, "Location's href: " + name); + + self.test(() => { + assert_throws_dom("SyntaxError", () => self.open(test.input).close()) + }, "window.open(): " + name) + } + } +} +</script> diff --git a/testing/web-platform/tests/url/historical.any.js b/testing/web-platform/tests/url/historical.any.js new file mode 100644 index 0000000000..9c4b5f0ae9 --- /dev/null +++ b/testing/web-platform/tests/url/historical.any.js @@ -0,0 +1,46 @@ +if (self.location) { + test(function() { + assert_false("searchParams" in self.location, + "location object should not have a searchParams attribute"); + }, "searchParams on location object"); +} + +if(self.GLOBAL.isWindow()) { + test(() => { + assert_false("searchParams" in document.createElement("a")) + assert_false("searchParams" in document.createElement("area")) + }, "<a> and <area>.searchParams should be undefined"); +} + +test(function() { + var url = new URL("./foo", "http://www.example.org"); + assert_equals(url.href, "http://www.example.org/foo"); + assert_throws_js(TypeError, function() { + url.href = "./bar"; + }); +}, "Setting URL's href attribute and base URLs"); + +test(function() { + assert_equals(URL.domainToASCII, undefined); +}, "URL.domainToASCII should be undefined"); + +test(function() { + assert_equals(URL.domainToUnicode, undefined); +}, "URL.domainToUnicode should be undefined"); + +test(() => { + assert_throws_dom("DataCloneError", () => self.structuredClone(new URL("about:blank"))); +}, "URL: no structured serialize/deserialize support"); + +test(() => { + assert_throws_dom("DataCloneError", () => self.structuredClone(new URLSearchParams())); +}, "URLSearchParams: no structured serialize/deserialize support"); + +test(() => { + const url = new URL("about:blank"); + url.toString = () => { throw 1 }; + assert_throws_exactly(1, () => new URL(url), "url argument"); + assert_throws_exactly(1, () => new URL("about:blank", url), "base argument"); +}, "Constructor only takes strings"); + +done(); diff --git a/testing/web-platform/tests/url/idlharness-shadowrealm.window.js b/testing/web-platform/tests/url/idlharness-shadowrealm.window.js new file mode 100644 index 0000000000..2373f84e0e --- /dev/null +++ b/testing/web-platform/tests/url/idlharness-shadowrealm.window.js @@ -0,0 +1,2 @@ +// META: script=/resources/idlharness-shadowrealm.js +idl_test_shadowrealm(["url"], []); diff --git a/testing/web-platform/tests/url/idlharness.any.js b/testing/web-platform/tests/url/idlharness.any.js new file mode 100644 index 0000000000..4a0e52f12b --- /dev/null +++ b/testing/web-platform/tests/url/idlharness.any.js @@ -0,0 +1,13 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +idl_test( + ['url'], + [], // no deps + idl_array => { + idl_array.add_objects({ + URL: ['new URL("http://foo")'], + URLSearchParams: ['new URLSearchParams("hi=there&thank=you")'] + }); + } +); diff --git a/testing/web-platform/tests/url/javascript-urls.window.js b/testing/web-platform/tests/url/javascript-urls.window.js new file mode 100644 index 0000000000..4f617beca1 --- /dev/null +++ b/testing/web-platform/tests/url/javascript-urls.window.js @@ -0,0 +1,63 @@ +// The results of this test are all over the map due to browsers behaving very differently for +// javascript: URLs. +// +// Chromium is pretty close execution-wise, but it parses javascript: URLs incorrectly. +// Gecko navigates to non-string return values of the result of executing a javascript: URL. +// WebKit executes javascript: URLs too early and has a harness error due to URL parsing. +// +// The expectations below should match the HTML and URL standards. +[ + { + "description": "javascript: URL that fails to parse due to invalid host", + "input": "javascript://test:test/%0aglobalThis.shouldNotExistA=1", + "property": "shouldNotExistA", + "expected": undefined + }, + { + "description": "javascript: URL that fails to parse due to invalid host and has a U+0009 in scheme", + "input": "java\x09script://test:test/%0aglobalThis.shouldNotExistB=1", + "property": "shouldNotExistB", + "expected": undefined + }, + { + "description": "javascript: URL without an opaque path", + "input": "javascript://host/1%0a//../0/;globalThis.shouldBeOne=1;/%0aglobalThis.shouldBeOne=2;/..///", + "property": "shouldBeOne", + "expected": 1 + }, + { + "description": "javascript: URL containing a JavaScript string split over path and query", + // Use ";undefined" to avoid returning a string. + "input": "javascript:globalThis.shouldBeAStringA = \"https://whatsoever.com/?a=b&c=5&x=y\";undefined", + "property": "shouldBeAStringA", + "expected": "https://whatsoever.com/?a=b&c=5&x=y" + }, + { + "description": "javascript: URL containing a JavaScript string split over path and query and has a U+000A in scheme", + // Use ";undefined" to avoid returning a string. + "input": "java\x0Ascript:globalThis.shouldBeAStringB = \"https://whatsoever.com/?a=b&c=5&x=y\";undefined", + "property": "shouldBeAStringB", + "expected": "https://whatsoever.com/?a=b&c=5&x=y" + } +].forEach(({ description, input, property, expected }) => { + // Use promise_test so the tests run in sequence. Needed for globalThis.verify below. + promise_test(t => { + const anchor = document.body.appendChild(document.createElement("a")); + t.add_cleanup(() => anchor.remove()); + anchor.href = input; + assert_equals(globalThis[property], undefined, "Property is undefined before the click"); + anchor.click(); + assert_equals(globalThis[property], undefined, "Property is undefined immediately after the click"); + + // Since we cannot reliably queue a task to run after the task queued as a result of the click() + // above, we do another click() with a new URL. + return new Promise(resolve => { + globalThis.verify = t.step_func(() => { + assert_equals(globalThis[property], expected, `Property is ${expected} once the navigation happened`); + resolve(); + }); + anchor.href = "javascript:globalThis.verify()"; + anchor.click(); + }); + }, description); +}); diff --git a/testing/web-platform/tests/url/percent-encoding.window.js b/testing/web-platform/tests/url/percent-encoding.window.js new file mode 100644 index 0000000000..dcb5c1e55b --- /dev/null +++ b/testing/web-platform/tests/url/percent-encoding.window.js @@ -0,0 +1,33 @@ +promise_test(() => fetch("resources/percent-encoding.json").then(res => res.json()).then(runTests), "Loading data…"); + +function runTests(testUnits) { + for (const testUnit of testUnits) { + // Ignore comments + if (typeof testUnit === "string") { + continue; + } + for (const encoding of Object.keys(testUnit.output)) { + async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + frame.onload = t.step_func_done(() => { + const output = frame.contentDocument.querySelector("a"); + // Test that the fragment is always UTF-8 encoded + assert_equals(output.hash, `#${testUnit.output["utf-8"]}`, "fragment"); + assert_equals(output.search, `?${testUnit.output[encoding]}`, "query"); + }); + frame.src = `resources/percent-encoding.py?encoding=${encoding}&value=${toBase64(testUnit.input)}`; + }, `Input ${testUnit.input} with encoding ${encoding}`); + } + } +} + +// Use base64 to avoid relying on the URL parser to get UTF-8 percent-encoding correctly. This does +// not use btoa directly as that only works with code points in the range U+0000 to U+00FF, +// inclusive. +function toBase64(input) { + const bytes = new TextEncoder().encode(input); + const byteString = Array.from(bytes, byte => String.fromCharCode(byte)).join(""); + const encoded = self.btoa(byteString); + return encoded; +} diff --git a/testing/web-platform/tests/url/resources/IdnaTestV2.json b/testing/web-platform/tests/url/resources/IdnaTestV2.json new file mode 100644 index 0000000000..669d4b0938 --- /dev/null +++ b/testing/web-platform/tests/url/resources/IdnaTestV2.json @@ -0,0 +1,9754 @@ +[ + "THIS IS A GENERATED FILE. PLEASE DO NOT MODIFY DIRECTLY. See ../tools/IdnaTestV2-parser.py instead.", + "--exclude-ipv4-like: True; --exclude-std3: True; --exclude_bidi: True", + { + "input": "fass.de", + "output": "fass.de" + }, + { + "input": "fa\u00df.de", + "output": "xn--fa-hia.de" + }, + { + "input": "Fa\u00df.de", + "output": "xn--fa-hia.de" + }, + { + "input": "xn--fa-hia.de", + "output": "xn--fa-hia.de" + }, + { + "input": "\u00e0.\u05d0\u0308", + "output": "xn--0ca.xn--ssa73l" + }, + { + "input": "a\u0300.\u05d0\u0308", + "output": "xn--0ca.xn--ssa73l" + }, + { + "input": "A\u0300.\u05d0\u0308", + "output": "xn--0ca.xn--ssa73l" + }, + { + "input": "\u00c0.\u05d0\u0308", + "output": "xn--0ca.xn--ssa73l" + }, + { + "input": "xn--0ca.xn--ssa73l", + "output": "xn--0ca.xn--ssa73l" + }, + { + "input": "\u00e0\u0308.\u05d0", + "output": "xn--0ca81i.xn--4db" + }, + { + "input": "a\u0300\u0308.\u05d0", + "output": "xn--0ca81i.xn--4db" + }, + { + "input": "A\u0300\u0308.\u05d0", + "output": "xn--0ca81i.xn--4db" + }, + { + "input": "\u00c0\u0308.\u05d0", + "output": "xn--0ca81i.xn--4db" + }, + { + "input": "xn--0ca81i.xn--4db", + "output": "xn--0ca81i.xn--4db" + }, + { + "comment": "C1", + "input": "a\u200cb", + "output": null + }, + { + "comment": "C1", + "input": "A\u200cB", + "output": null + }, + { + "comment": "C1", + "input": "A\u200cb", + "output": null + }, + { + "input": "ab", + "output": "ab" + }, + { + "comment": "C1", + "input": "xn--ab-j1t", + "output": null + }, + { + "input": "a\u094d\u200cb", + "output": "xn--ab-fsf604u" + }, + { + "input": "A\u094d\u200cB", + "output": "xn--ab-fsf604u" + }, + { + "input": "A\u094d\u200cb", + "output": "xn--ab-fsf604u" + }, + { + "input": "xn--ab-fsf", + "output": "xn--ab-fsf" + }, + { + "input": "a\u094db", + "output": "xn--ab-fsf" + }, + { + "input": "A\u094dB", + "output": "xn--ab-fsf" + }, + { + "input": "A\u094db", + "output": "xn--ab-fsf" + }, + { + "input": "xn--ab-fsf604u", + "output": "xn--ab-fsf604u" + }, + { + "comment": "C2", + "input": "a\u200db", + "output": null + }, + { + "comment": "C2", + "input": "A\u200dB", + "output": null + }, + { + "comment": "C2", + "input": "A\u200db", + "output": null + }, + { + "comment": "C2", + "input": "xn--ab-m1t", + "output": null + }, + { + "input": "a\u094d\u200db", + "output": "xn--ab-fsf014u" + }, + { + "input": "A\u094d\u200dB", + "output": "xn--ab-fsf014u" + }, + { + "input": "A\u094d\u200db", + "output": "xn--ab-fsf014u" + }, + { + "input": "xn--ab-fsf014u", + "output": "xn--ab-fsf014u" + }, + { + "input": "\u00a1", + "output": "xn--7a" + }, + { + "input": "xn--7a", + "output": "xn--7a" + }, + { + "input": "\u19da", + "output": "xn--pkf" + }, + { + "input": "xn--pkf", + "output": "xn--pkf" + }, + { + "comment": "A4_2 (ignored)", + "input": "\u3002", + "output": "." + }, + { + "comment": "A4_2 (ignored)", + "input": ".", + "output": "." + }, + { + "input": "\uab60", + "output": "xn--3y9a" + }, + { + "input": "xn--3y9a", + "output": "xn--3y9a" + }, + { + "comment": "A4_2 (ignored)", + "input": "1234567890\u00e41234567890123456789012345678901234567890123456", + "output": "xn--12345678901234567890123456789012345678901234567890123456-fxe" + }, + { + "comment": "A4_2 (ignored)", + "input": "1234567890a\u03081234567890123456789012345678901234567890123456", + "output": "xn--12345678901234567890123456789012345678901234567890123456-fxe" + }, + { + "comment": "A4_2 (ignored)", + "input": "1234567890A\u03081234567890123456789012345678901234567890123456", + "output": "xn--12345678901234567890123456789012345678901234567890123456-fxe" + }, + { + "comment": "A4_2 (ignored)", + "input": "1234567890\u00c41234567890123456789012345678901234567890123456", + "output": "xn--12345678901234567890123456789012345678901234567890123456-fxe" + }, + { + "comment": "A4_2 (ignored)", + "input": "xn--12345678901234567890123456789012345678901234567890123456-fxe", + "output": "xn--12345678901234567890123456789012345678901234567890123456-fxe" + }, + { + "input": "www.eXample.cOm", + "output": "www.example.com" + }, + { + "input": "B\u00fccher.de", + "output": "xn--bcher-kva.de" + }, + { + "input": "Bu\u0308cher.de", + "output": "xn--bcher-kva.de" + }, + { + "input": "bu\u0308cher.de", + "output": "xn--bcher-kva.de" + }, + { + "input": "b\u00fccher.de", + "output": "xn--bcher-kva.de" + }, + { + "input": "B\u00dcCHER.DE", + "output": "xn--bcher-kva.de" + }, + { + "input": "BU\u0308CHER.DE", + "output": "xn--bcher-kva.de" + }, + { + "input": "xn--bcher-kva.de", + "output": "xn--bcher-kva.de" + }, + { + "input": "\u00d6BB", + "output": "xn--bb-eka" + }, + { + "input": "O\u0308BB", + "output": "xn--bb-eka" + }, + { + "input": "o\u0308bb", + "output": "xn--bb-eka" + }, + { + "input": "\u00f6bb", + "output": "xn--bb-eka" + }, + { + "input": "\u00d6bb", + "output": "xn--bb-eka" + }, + { + "input": "O\u0308bb", + "output": "xn--bb-eka" + }, + { + "input": "xn--bb-eka", + "output": "xn--bb-eka" + }, + { + "input": "\u03b2\u03cc\u03bb\u03bf\u03c2.com", + "output": "xn--nxasmm1c.com" + }, + { + "input": "\u03b2\u03bf\u0301\u03bb\u03bf\u03c2.com", + "output": "xn--nxasmm1c.com" + }, + { + "input": "\u0392\u039f\u0301\u039b\u039f\u03a3.COM", + "output": "xn--nxasmq6b.com" + }, + { + "input": "\u0392\u038c\u039b\u039f\u03a3.COM", + "output": "xn--nxasmq6b.com" + }, + { + "input": "\u03b2\u03cc\u03bb\u03bf\u03c3.com", + "output": "xn--nxasmq6b.com" + }, + { + "input": "\u03b2\u03bf\u0301\u03bb\u03bf\u03c3.com", + "output": "xn--nxasmq6b.com" + }, + { + "input": "\u0392\u03bf\u0301\u03bb\u03bf\u03c3.com", + "output": "xn--nxasmq6b.com" + }, + { + "input": "\u0392\u03cc\u03bb\u03bf\u03c3.com", + "output": "xn--nxasmq6b.com" + }, + { + "input": "xn--nxasmq6b.com", + "output": "xn--nxasmq6b.com" + }, + { + "input": "\u0392\u03bf\u0301\u03bb\u03bf\u03c2.com", + "output": "xn--nxasmm1c.com" + }, + { + "input": "\u0392\u03cc\u03bb\u03bf\u03c2.com", + "output": "xn--nxasmm1c.com" + }, + { + "input": "xn--nxasmm1c.com", + "output": "xn--nxasmm1c.com" + }, + { + "input": "xn--nxasmm1c", + "output": "xn--nxasmm1c" + }, + { + "input": "\u03b2\u03cc\u03bb\u03bf\u03c2", + "output": "xn--nxasmm1c" + }, + { + "input": "\u03b2\u03bf\u0301\u03bb\u03bf\u03c2", + "output": "xn--nxasmm1c" + }, + { + "input": "\u0392\u039f\u0301\u039b\u039f\u03a3", + "output": "xn--nxasmq6b" + }, + { + "input": "\u0392\u038c\u039b\u039f\u03a3", + "output": "xn--nxasmq6b" + }, + { + "input": "\u03b2\u03cc\u03bb\u03bf\u03c3", + "output": "xn--nxasmq6b" + }, + { + "input": "\u03b2\u03bf\u0301\u03bb\u03bf\u03c3", + "output": "xn--nxasmq6b" + }, + { + "input": "\u0392\u03bf\u0301\u03bb\u03bf\u03c3", + "output": "xn--nxasmq6b" + }, + { + "input": "\u0392\u03cc\u03bb\u03bf\u03c3", + "output": "xn--nxasmq6b" + }, + { + "input": "xn--nxasmq6b", + "output": "xn--nxasmq6b" + }, + { + "input": "\u0392\u03cc\u03bb\u03bf\u03c2", + "output": "xn--nxasmm1c" + }, + { + "input": "\u0392\u03bf\u0301\u03bb\u03bf\u03c2", + "output": "xn--nxasmm1c" + }, + { + "input": "www.\u0dc1\u0dca\u200d\u0dbb\u0dd3.com", + "output": "www.xn--10cl1a0b660p.com" + }, + { + "input": "WWW.\u0dc1\u0dca\u200d\u0dbb\u0dd3.COM", + "output": "www.xn--10cl1a0b660p.com" + }, + { + "input": "Www.\u0dc1\u0dca\u200d\u0dbb\u0dd3.com", + "output": "www.xn--10cl1a0b660p.com" + }, + { + "input": "www.xn--10cl1a0b.com", + "output": "www.xn--10cl1a0b.com" + }, + { + "input": "www.\u0dc1\u0dca\u0dbb\u0dd3.com", + "output": "www.xn--10cl1a0b.com" + }, + { + "input": "WWW.\u0dc1\u0dca\u0dbb\u0dd3.COM", + "output": "www.xn--10cl1a0b.com" + }, + { + "input": "Www.\u0dc1\u0dca\u0dbb\u0dd3.com", + "output": "www.xn--10cl1a0b.com" + }, + { + "input": "www.xn--10cl1a0b660p.com", + "output": "www.xn--10cl1a0b660p.com" + }, + { + "input": "\u0646\u0627\u0645\u0647\u200c\u0627\u06cc", + "output": "xn--mgba3gch31f060k" + }, + { + "input": "xn--mgba3gch31f", + "output": "xn--mgba3gch31f" + }, + { + "input": "\u0646\u0627\u0645\u0647\u0627\u06cc", + "output": "xn--mgba3gch31f" + }, + { + "input": "xn--mgba3gch31f060k", + "output": "xn--mgba3gch31f060k" + }, + { + "input": "xn--mgba3gch31f060k.com", + "output": "xn--mgba3gch31f060k.com" + }, + { + "input": "\u0646\u0627\u0645\u0647\u200c\u0627\u06cc.com", + "output": "xn--mgba3gch31f060k.com" + }, + { + "input": "\u0646\u0627\u0645\u0647\u200c\u0627\u06cc.COM", + "output": "xn--mgba3gch31f060k.com" + }, + { + "input": "xn--mgba3gch31f.com", + "output": "xn--mgba3gch31f.com" + }, + { + "input": "\u0646\u0627\u0645\u0647\u0627\u06cc.com", + "output": "xn--mgba3gch31f.com" + }, + { + "input": "\u0646\u0627\u0645\u0647\u0627\u06cc.COM", + "output": "xn--mgba3gch31f.com" + }, + { + "input": "a.b\uff0ec\u3002d\uff61", + "output": "a.b.c.d." + }, + { + "input": "a.b.c\u3002d\u3002", + "output": "a.b.c.d." + }, + { + "input": "A.B.C\u3002D\u3002", + "output": "a.b.c.d." + }, + { + "input": "A.b.c\u3002D\u3002", + "output": "a.b.c.d." + }, + { + "input": "a.b.c.d.", + "output": "a.b.c.d." + }, + { + "input": "A.B\uff0eC\u3002D\uff61", + "output": "a.b.c.d." + }, + { + "input": "A.b\uff0ec\u3002D\uff61", + "output": "a.b.c.d." + }, + { + "input": "U\u0308.xn--tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00dc.xn--tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00fc.xn--tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "u\u0308.xn--tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "U\u0308.XN--TDA", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00dc.XN--TDA", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00dc.xn--Tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "U\u0308.xn--Tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "xn--tda.xn--tda", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00fc.\u00fc", + "output": "xn--tda.xn--tda" + }, + { + "input": "u\u0308.u\u0308", + "output": "xn--tda.xn--tda" + }, + { + "input": "U\u0308.U\u0308", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00dc.\u00dc", + "output": "xn--tda.xn--tda" + }, + { + "input": "\u00dc.\u00fc", + "output": "xn--tda.xn--tda" + }, + { + "input": "U\u0308.u\u0308", + "output": "xn--tda.xn--tda" + }, + { + "comment": "V1", + "input": "xn--u-ccb", + "output": null + }, + { + "comment": "P1; V6", + "input": "a\u2488com", + "output": null + }, + { + "input": "a1.com", + "output": "a1.com" + }, + { + "comment": "P1; V6", + "input": "A\u2488COM", + "output": null + }, + { + "comment": "P1; V6", + "input": "A\u2488Com", + "output": null + }, + { + "comment": "V6", + "input": "xn--acom-0w1b", + "output": null + }, + { + "comment": "V6", + "input": "xn--a-ecp.ru", + "output": null + }, + { + "comment": "P4", + "input": "xn--0.pt", + "output": null + }, + { + "comment": "V6", + "input": "xn--a.pt", + "output": null + }, + { + "comment": "P4", + "input": "xn--a-\u00c4.pt", + "output": null + }, + { + "comment": "P4", + "input": "xn--a-A\u0308.pt", + "output": null + }, + { + "comment": "P4", + "input": "xn--a-a\u0308.pt", + "output": null + }, + { + "comment": "P4", + "input": "xn--a-\u00e4.pt", + "output": null + }, + { + "comment": "P4", + "input": "XN--A-\u00c4.PT", + "output": null + }, + { + "comment": "P4", + "input": "XN--A-A\u0308.PT", + "output": null + }, + { + "comment": "P4", + "input": "Xn--A-A\u0308.pt", + "output": null + }, + { + "comment": "P4", + "input": "Xn--A-\u00c4.pt", + "output": null + }, + { + "comment": "V2 (ignored)", + "input": "xn--xn--a--gua.pt", + "output": "xn--xn--a--gua.pt" + }, + { + "input": "\u65e5\u672c\u8a9e\u3002\uff2a\uff30", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e\u3002JP", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e\u3002jp", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e\u3002Jp", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "xn--wgv71a119e.jp", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e.jp", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e.JP", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e.Jp", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e\u3002\uff4a\uff50", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u65e5\u672c\u8a9e\u3002\uff2a\uff50", + "output": "xn--wgv71a119e.jp" + }, + { + "input": "\u2615", + "output": "xn--53h" + }, + { + "input": "xn--53h", + "output": "xn--53h" + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.a\u00df\u200c\u200db\u200c\u200dc\u00df\u00df\u00df\u00dfd\u03c2\u03c3\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00dfe\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00dfx\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00dfy\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u0302\u00dfz", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.ASS\u200c\u200dB\u200c\u200dCSSSSSSSSD\u03a3\u03a3SSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSS\u0302SSZ", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.ASS\u200c\u200dB\u200c\u200dCSSSSSSSSD\u03a3\u03a3SSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSS\u015cSSZ", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.ass\u200c\u200db\u200c\u200dcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\u015dssz", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.ass\u200c\u200db\u200c\u200dcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.Ass\u200c\u200db\u200c\u200dcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.Ass\u200c\u200db\u200c\u200dcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\u015dssz", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "A4_2 (ignored)", + "input": "1.assbcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\u015dssz", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "A4_2 (ignored)", + "input": "1.assbcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "A4_2 (ignored)", + "input": "1.ASSBCSSSSSSSSD\u03a3\u03a3SSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSSS\u0302SSZ", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "A4_2 (ignored)", + "input": "1.ASSBCSSSSSSSSD\u03a3\u03a3SSSSSSSSSSSSSSSSESSSSSSSSSSSSSSSSSSSSXSSSSSSSSSSSSSSSSSSSSYSSSSSSSSSSSSSSS\u015cSSZ", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "A4_2 (ignored)", + "input": "1.Assbcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssss\u015dssz", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "A4_2 (ignored)", + "input": "1.Assbcssssssssd\u03c3\u03c3ssssssssssssssssessssssssssssssssssssxssssssssssssssssssssyssssssssssssssss\u0302ssz", + "output": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa" + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.xn--assbcssssssssdssssssssssssssssessssssssssssssssssssxssssssssssssssssssssysssssssssssssssssz-pxq1419aa69989dba9gc", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.A\u00df\u200c\u200db\u200c\u200dc\u00df\u00df\u00df\u00dfd\u03c2\u03c3\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00dfe\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00dfx\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00dfy\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u00df\u0302\u00dfz", + "output": null + }, + { + "comment": "C1; C2; A4_2 (ignored)", + "input": "1.xn--abcdexyz-qyacaaabaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaa010ze2isb1140zba8cc", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200cx\u200dn\u200c-\u200d-b\u00df", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200cX\u200dN\u200c-\u200d-BSS", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200cx\u200dn\u200c-\u200d-bss", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200cX\u200dn\u200c-\u200d-Bss", + "output": null + }, + { + "input": "xn--bss", + "output": "xn--bss" + }, + { + "input": "\u5919", + "output": "xn--bss" + }, + { + "comment": "C1; C2", + "input": "xn--xn--bss-7z6ccid", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200cX\u200dn\u200c-\u200d-B\u00df", + "output": null + }, + { + "comment": "C1; C2", + "input": "xn--xn--b-pqa5796ccahd", + "output": null + }, + { + "input": "\u02e3\u034f\u2115\u200b\ufe63\u00ad\uff0d\u180c\u212c\ufe00\u017f\u2064\ud835\udd30\udb40\uddef\ufb04", + "output": "xn--bssffl" + }, + { + "input": "x\u034fN\u200b-\u00ad-\u180cB\ufe00s\u2064s\udb40\uddefffl", + "output": "xn--bssffl" + }, + { + "input": "x\u034fn\u200b-\u00ad-\u180cb\ufe00s\u2064s\udb40\uddefffl", + "output": "xn--bssffl" + }, + { + "input": "X\u034fN\u200b-\u00ad-\u180cB\ufe00S\u2064S\udb40\uddefFFL", + "output": "xn--bssffl" + }, + { + "input": "X\u034fn\u200b-\u00ad-\u180cB\ufe00s\u2064s\udb40\uddefffl", + "output": "xn--bssffl" + }, + { + "input": "xn--bssffl", + "output": "xn--bssffl" + }, + { + "input": "\u5921\u591e\u591c\u5919", + "output": "xn--bssffl" + }, + { + "input": "\u02e3\u034f\u2115\u200b\ufe63\u00ad\uff0d\u180c\u212c\ufe00S\u2064\ud835\udd30\udb40\uddefFFL", + "output": "xn--bssffl" + }, + { + "input": "x\u034fN\u200b-\u00ad-\u180cB\ufe00S\u2064s\udb40\uddefFFL", + "output": "xn--bssffl" + }, + { + "input": "\u02e3\u034f\u2115\u200b\ufe63\u00ad\uff0d\u180c\u212c\ufe00s\u2064\ud835\udd30\udb40\uddefffl", + "output": "xn--bssffl" + }, + { + "input": "\u00e41234567890123456789012345678901234567890123456789012345", + "output": "xn--1234567890123456789012345678901234567890123456789012345-9te" + }, + { + "input": "a\u03081234567890123456789012345678901234567890123456789012345", + "output": "xn--1234567890123456789012345678901234567890123456789012345-9te" + }, + { + "input": "A\u03081234567890123456789012345678901234567890123456789012345", + "output": "xn--1234567890123456789012345678901234567890123456789012345-9te" + }, + { + "input": "\u00c41234567890123456789012345678901234567890123456789012345", + "output": "xn--1234567890123456789012345678901234567890123456789012345-9te" + }, + { + "input": "xn--1234567890123456789012345678901234567890123456789012345-9te", + "output": "xn--1234567890123456789012345678901234567890123456789012345-9te" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "a.b..-q--a-.e", + "output": "a.b..-q--a-.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "a.b..-q--\u00e4-.e", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "a.b..-q--a\u0308-.e", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "A.B..-Q--A\u0308-.E", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "A.B..-Q--\u00c4-.E", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "A.b..-Q--\u00c4-.E", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "A.b..-Q--A\u0308-.E", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "V2 (ignored); V3 (ignored); A4_2 (ignored)", + "input": "a.b..xn---q----jra.e", + "output": "a.b..xn---q----jra.e" + }, + { + "comment": "A4_2 (ignored)", + "input": "a..c", + "output": "a..c" + }, + { + "comment": "V3 (ignored)", + "input": "a.-b.", + "output": "a.-b." + }, + { + "comment": "V3 (ignored)", + "input": "a.b-.c", + "output": "a.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "a.-.c", + "output": "a.-.c" + }, + { + "comment": "V2 (ignored)", + "input": "a.bc--de.f", + "output": "a.bc--de.f" + }, + { + "comment": "A4_2 (ignored)", + "input": "\u00e4.\u00ad.c", + "output": "xn--4ca..c" + }, + { + "comment": "A4_2 (ignored)", + "input": "a\u0308.\u00ad.c", + "output": "xn--4ca..c" + }, + { + "comment": "A4_2 (ignored)", + "input": "A\u0308.\u00ad.C", + "output": "xn--4ca..c" + }, + { + "comment": "A4_2 (ignored)", + "input": "\u00c4.\u00ad.C", + "output": "xn--4ca..c" + }, + { + "comment": "A4_2 (ignored)", + "input": "xn--4ca..c", + "output": "xn--4ca..c" + }, + { + "comment": "V3 (ignored)", + "input": "\u00e4.-b.", + "output": "xn--4ca.-b." + }, + { + "comment": "V3 (ignored)", + "input": "a\u0308.-b.", + "output": "xn--4ca.-b." + }, + { + "comment": "V3 (ignored)", + "input": "A\u0308.-B.", + "output": "xn--4ca.-b." + }, + { + "comment": "V3 (ignored)", + "input": "\u00c4.-B.", + "output": "xn--4ca.-b." + }, + { + "comment": "V3 (ignored)", + "input": "xn--4ca.-b.", + "output": "xn--4ca.-b." + }, + { + "comment": "V3 (ignored)", + "input": "\u00e4.b-.c", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "a\u0308.b-.c", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "A\u0308.B-.C", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "\u00c4.B-.C", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "\u00c4.b-.C", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "A\u0308.b-.C", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "xn--4ca.b-.c", + "output": "xn--4ca.b-.c" + }, + { + "comment": "V3 (ignored)", + "input": "\u00e4.-.c", + "output": "xn--4ca.-.c" + }, + { + "comment": "V3 (ignored)", + "input": "a\u0308.-.c", + "output": "xn--4ca.-.c" + }, + { + "comment": "V3 (ignored)", + "input": "A\u0308.-.C", + "output": "xn--4ca.-.c" + }, + { + "comment": "V3 (ignored)", + "input": "\u00c4.-.C", + "output": "xn--4ca.-.c" + }, + { + "comment": "V3 (ignored)", + "input": "xn--4ca.-.c", + "output": "xn--4ca.-.c" + }, + { + "comment": "V2 (ignored)", + "input": "\u00e4.bc--de.f", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V2 (ignored)", + "input": "a\u0308.bc--de.f", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V2 (ignored)", + "input": "A\u0308.BC--DE.F", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V2 (ignored)", + "input": "\u00c4.BC--DE.F", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V2 (ignored)", + "input": "\u00c4.bc--De.f", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V2 (ignored)", + "input": "A\u0308.bc--De.f", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V2 (ignored)", + "input": "xn--4ca.bc--de.f", + "output": "xn--4ca.bc--de.f" + }, + { + "comment": "V5", + "input": "a.b.\u0308c.d", + "output": null + }, + { + "comment": "V5", + "input": "A.B.\u0308C.D", + "output": null + }, + { + "comment": "V5", + "input": "A.b.\u0308c.d", + "output": null + }, + { + "comment": "V5", + "input": "a.b.xn--c-bcb.d", + "output": null + }, + { + "input": "A0", + "output": "a0" + }, + { + "input": "0A", + "output": "0a" + }, + { + "input": "\u05d0\u05c7", + "output": "xn--vdbr" + }, + { + "input": "xn--vdbr", + "output": "xn--vdbr" + }, + { + "input": "\u05d09\u05c7", + "output": "xn--9-ihcz" + }, + { + "input": "xn--9-ihcz", + "output": "xn--9-ihcz" + }, + { + "input": "\u05d0\u05ea", + "output": "xn--4db6c" + }, + { + "input": "xn--4db6c", + "output": "xn--4db6c" + }, + { + "input": "\u05d0\u05f3\u05ea", + "output": "xn--4db6c0a" + }, + { + "input": "xn--4db6c0a", + "output": "xn--4db6c0a" + }, + { + "input": "\u05d07\u05ea", + "output": "xn--7-zhc3f" + }, + { + "input": "xn--7-zhc3f", + "output": "xn--7-zhc3f" + }, + { + "input": "\u05d0\u0667\u05ea", + "output": "xn--4db6c6t" + }, + { + "input": "xn--4db6c6t", + "output": "xn--4db6c6t" + }, + { + "input": "\u0bb9\u0bcd\u200d", + "output": "xn--dmc4b194h" + }, + { + "input": "xn--dmc4b", + "output": "xn--dmc4b" + }, + { + "input": "\u0bb9\u0bcd", + "output": "xn--dmc4b" + }, + { + "input": "xn--dmc4b194h", + "output": "xn--dmc4b194h" + }, + { + "comment": "C2", + "input": "\u0bb9\u200d", + "output": null + }, + { + "input": "xn--dmc", + "output": "xn--dmc" + }, + { + "input": "\u0bb9", + "output": "xn--dmc" + }, + { + "comment": "C2", + "input": "xn--dmc225h", + "output": null + }, + { + "comment": "C2", + "input": "\u200d", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "", + "output": "" + }, + { + "comment": "C2", + "input": "xn--1ug", + "output": null + }, + { + "input": "\u0bb9\u0bcd\u200c", + "output": "xn--dmc4by94h" + }, + { + "input": "xn--dmc4by94h", + "output": "xn--dmc4by94h" + }, + { + "comment": "C1", + "input": "\u0bb9\u200c", + "output": null + }, + { + "comment": "C1", + "input": "xn--dmc025h", + "output": null + }, + { + "comment": "C1", + "input": "\u200c", + "output": null + }, + { + "comment": "C1", + "input": "xn--0ug", + "output": null + }, + { + "input": "\u0644\u0670\u200c\u06ed\u06ef", + "output": "xn--ghb2gxqia7523a" + }, + { + "input": "xn--ghb2gxqia", + "output": "xn--ghb2gxqia" + }, + { + "input": "\u0644\u0670\u06ed\u06ef", + "output": "xn--ghb2gxqia" + }, + { + "input": "xn--ghb2gxqia7523a", + "output": "xn--ghb2gxqia7523a" + }, + { + "input": "\u0644\u0670\u200c\u06ef", + "output": "xn--ghb2g3qq34f" + }, + { + "input": "xn--ghb2g3q", + "output": "xn--ghb2g3q" + }, + { + "input": "\u0644\u0670\u06ef", + "output": "xn--ghb2g3q" + }, + { + "input": "xn--ghb2g3qq34f", + "output": "xn--ghb2g3qq34f" + }, + { + "input": "\u0644\u200c\u06ed\u06ef", + "output": "xn--ghb25aga828w" + }, + { + "input": "xn--ghb25aga", + "output": "xn--ghb25aga" + }, + { + "input": "\u0644\u06ed\u06ef", + "output": "xn--ghb25aga" + }, + { + "input": "xn--ghb25aga828w", + "output": "xn--ghb25aga828w" + }, + { + "input": "\u0644\u200c\u06ef", + "output": "xn--ghb65a953d" + }, + { + "input": "xn--ghb65a", + "output": "xn--ghb65a" + }, + { + "input": "\u0644\u06ef", + "output": "xn--ghb65a" + }, + { + "input": "xn--ghb65a953d", + "output": "xn--ghb65a953d" + }, + { + "input": "xn--ghb2gxq", + "output": "xn--ghb2gxq" + }, + { + "input": "\u0644\u0670\u06ed", + "output": "xn--ghb2gxq" + }, + { + "comment": "C1", + "input": "\u06ef\u200c\u06ef", + "output": null + }, + { + "input": "xn--cmba", + "output": "xn--cmba" + }, + { + "input": "\u06ef\u06ef", + "output": "xn--cmba" + }, + { + "comment": "C1", + "input": "xn--cmba004q", + "output": null + }, + { + "input": "xn--ghb", + "output": "xn--ghb" + }, + { + "input": "\u0644", + "output": "xn--ghb" + }, + { + "comment": "A4_2 (ignored)", + "input": "a\u3002\u3002b", + "output": "a..b" + }, + { + "comment": "A4_2 (ignored)", + "input": "A\u3002\u3002B", + "output": "a..b" + }, + { + "comment": "A4_2 (ignored)", + "input": "a..b", + "output": "a..b" + }, + { + "comment": "A4_2 (ignored)", + "input": "..xn--skb", + "output": "..xn--skb" + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\u2495\u221d\u065f\uda0e\udd26\uff0e-\udb40\udd2f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "14.\u221d\u065f\uda0e\udd26.-\udb40\udd2f", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "14.xn--7hb713l3v90n.-", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--7hb713lfwbi1311b.-", + "output": null + }, + { + "input": "\ua863.\u07cf", + "output": "xn--8c9a.xn--qsb" + }, + { + "input": "xn--8c9a.xn--qsb", + "output": "xn--8c9a.xn--qsb" + }, + { + "comment": "P1; V6", + "input": "\ud97d\udf9c\uff0e\ud803\udfc7\u0fa2\u077d\u0600", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud97d\udf9c\uff0e\ud803\udfc7\u0fa1\u0fb7\u077d\u0600", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud97d\udf9c.\ud803\udfc7\u0fa1\u0fb7\u077d\u0600", + "output": null + }, + { + "comment": "V6", + "input": "xn--gw68a.xn--ifb57ev2psc6027m", + "output": null + }, + { + "comment": "V5", + "input": "\ud84f\udcd4\u0303.\ud805\udcc2", + "output": null + }, + { + "comment": "V5", + "input": "xn--nsa95820a.xn--wz1d", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\ud9d4\udfad.\u10b2\ud804\uddc0", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\ud9d4\udfad.\u2d12\ud804\uddc0", + "output": null + }, + { + "comment": "V6", + "input": "xn--bn95b.xn--9kj2034e", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug15083f.xn--9kj2034e", + "output": null + }, + { + "comment": "V6", + "input": "xn--bn95b.xn--qnd6272k", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug15083f.xn--qnd6272k", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u7e71\ud805\uddbf\u200d.\uff18\ufe12", + "output": null + }, + { + "comment": "V6", + "input": "xn--gl0as212a.xn--8-o89h", + "output": null + }, + { + "comment": "V6", + "input": "xn--1ug6928ac48e.xn--8-o89h", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "\udb40\uddbe\uff0e\ud838\udc08", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "\udb40\uddbe.\ud838\udc08", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": ".xn--ph4h", + "output": null + }, + { + "comment": "C2", + "input": "\u00df\u06eb\u3002\u200d", + "output": null + }, + { + "comment": "C2", + "input": "SS\u06eb\u3002\u200d", + "output": null + }, + { + "comment": "C2", + "input": "ss\u06eb\u3002\u200d", + "output": null + }, + { + "comment": "C2", + "input": "Ss\u06eb\u3002\u200d", + "output": null + }, + { + "input": "xn--ss-59d.", + "output": "xn--ss-59d." + }, + { + "input": "ss\u06eb.", + "output": "xn--ss-59d." + }, + { + "input": "SS\u06eb.", + "output": "xn--ss-59d." + }, + { + "input": "Ss\u06eb.", + "output": "xn--ss-59d." + }, + { + "comment": "C2", + "input": "xn--ss-59d.xn--1ug", + "output": null + }, + { + "comment": "C2", + "input": "xn--zca012a.xn--1ug", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\udb41\udc35\u200c\u2488\uff0e\udb40\udf87", + "output": null + }, + { + "comment": "C1; P1; V6; A4_2 (ignored)", + "input": "\udb41\udc35\u200c1..\udb40\udf87", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": "xn--1-bs31m..xn--tv36e", + "output": null + }, + { + "comment": "C1; V6; A4_2 (ignored)", + "input": "xn--1-rgn37671n..xn--tv36e", + "output": null + }, + { + "comment": "V6", + "input": "xn--tshz2001k.xn--tv36e", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug88o47900b.xn--tv36e", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb3c\ude23\u065f\uaab2\u00df\u3002\udaf1\udce7", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb3c\ude23\u065f\uaab2SS\u3002\udaf1\udce7", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb3c\ude23\u065f\uaab2ss\u3002\udaf1\udce7", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb3c\ude23\u065f\uaab2Ss\u3002\udaf1\udce7", + "output": null + }, + { + "comment": "V6", + "input": "xn--ss-3xd2839nncy1m.xn--bb79d", + "output": null + }, + { + "comment": "V6", + "input": "xn--zca92z0t7n5w96j.xn--bb79d", + "output": null + }, + { + "comment": "C1; C2; P1; V6", + "input": "\u0774\u200c\ud83a\udd3f\u3002\ud8b5\ude10\u425c\u200d\ud9be\udd3c", + "output": null + }, + { + "comment": "C1; C2; P1; V6", + "input": "\u0774\u200c\ud83a\udd1d\u3002\ud8b5\ude10\u425c\u200d\ud9be\udd3c", + "output": null + }, + { + "comment": "V6", + "input": "xn--4pb2977v.xn--z0nt555ukbnv", + "output": null + }, + { + "comment": "C1; C2; V6", + "input": "xn--4pb607jjt73a.xn--1ug236ke314donv1a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u3164\u094d\u10a0\u17d0.\u180b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1160\u094d\u10a0\u17d0.\u180b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1160\u094d\u2d00\u17d0.\u180b", + "output": null + }, + { + "comment": "V6", + "input": "xn--n3b742bkqf4ty.", + "output": null + }, + { + "comment": "V6", + "input": "xn--n3b468aoqa89r.", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u3164\u094d\u2d00\u17d0.\u180b", + "output": null + }, + { + "comment": "V6", + "input": "xn--n3b445e53po6d.", + "output": null + }, + { + "comment": "V6", + "input": "xn--n3b468azngju2a.", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u2763\u200d\uff0e\u09cd\ud807\udc3d\u0612\ua929", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u2763\u200d.\u09cd\ud807\udc3d\u0612\ua929", + "output": null + }, + { + "comment": "V5", + "input": "xn--pei.xn--0fb32q3w7q2g4d", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--1ugy10a.xn--0fb32q3w7q2g4d", + "output": null + }, + { + "comment": "V5", + "input": "\u0349\u3002\ud85e\udc6b", + "output": null + }, + { + "comment": "V5", + "input": "xn--nua.xn--bc6k", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud807\udc3f\udb40\udd66\uff0e\u1160", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud807\udc3f\udb40\udd66.\u1160", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ok3d.xn--psd", + "output": null + }, + { + "comment": "V5", + "input": "\u850f\uff61\ud807\udc3a", + "output": null + }, + { + "comment": "V5", + "input": "\u850f\u3002\ud807\udc3a", + "output": null + }, + { + "comment": "V5", + "input": "xn--uy1a.xn--jk3d", + "output": null + }, + { + "comment": "V6", + "input": "xn--8g1d12120a.xn--5l6h", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud804\udee7\ua9c02\uff61\u39c9\uda09\udd84", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud804\udee7\ua9c02\u3002\u39c9\uda09\udd84", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--2-5z4eu89y.xn--97l02706d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2938\u03c2\ud8ab\udc40\uff61\uffa0", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2938\u03c2\ud8ab\udc40\u3002\u1160", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2938\u03a3\ud8ab\udc40\u3002\u1160", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2938\u03c3\ud8ab\udc40\u3002\u1160", + "output": null + }, + { + "comment": "V6", + "input": "xn--4xa192qmp03d.xn--psd", + "output": null + }, + { + "comment": "V6", + "input": "xn--3xa392qmp03d.xn--psd", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2938\u03a3\ud8ab\udc40\uff61\uffa0", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2938\u03c3\ud8ab\udc40\uff61\uffa0", + "output": null + }, + { + "comment": "V6", + "input": "xn--4xa192qmp03d.xn--cl7c", + "output": null + }, + { + "comment": "V6", + "input": "xn--3xa392qmp03d.xn--cl7c", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u200d\udb7d\udc56\udb40\udc50\uff0e\u05bd\ud826\udfb0\ua85d\ud800\udee1", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u200d\udb7d\udc56\udb40\udc50.\u05bd\ud826\udfb0\ua85d\ud800\udee1", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--b726ey18m.xn--ldb8734fg0qcyzzg", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--1ug66101lt8me.xn--ldb8734fg0qcyzzg", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u3002\udbcc\ude35\u03c2\ud8c2\udc07\u3002\ud802\udf88", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u3002\udbcc\ude35\u03a3\ud8c2\udc07\u3002\ud802\udf88", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u3002\udbcc\ude35\u03c3\ud8c2\udc07\u3002\ud802\udf88", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--4xa68573c7n64d.xn--f29c", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--3xa88573c7n64d.xn--f29c", + "output": null + }, + { + "input": "\ud83a\udd37.\ud802\udf90\ud83a\udc81\ud803\ude60\u0624", + "output": "xn--ve6h.xn--jgb1694kz0b2176a" + }, + { + "input": "\ud83a\udd37.\ud802\udf90\ud83a\udc81\ud803\ude60\u0648\u0654", + "output": "xn--ve6h.xn--jgb1694kz0b2176a" + }, + { + "input": "\ud83a\udd15.\ud802\udf90\ud83a\udc81\ud803\ude60\u0648\u0654", + "output": "xn--ve6h.xn--jgb1694kz0b2176a" + }, + { + "input": "\ud83a\udd15.\ud802\udf90\ud83a\udc81\ud803\ude60\u0624", + "output": "xn--ve6h.xn--jgb1694kz0b2176a" + }, + { + "input": "xn--ve6h.xn--jgb1694kz0b2176a", + "output": "xn--ve6h.xn--jgb1694kz0b2176a" + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "-\udb40\ude56\ua867\uff0e\udb40\ude82\ud8dc\udd83\ud83c\udd09", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----hg4ei0361g.xn--207ht163h7m94c", + "output": null + }, + { + "comment": "C1; V5", + "input": "\u200c\uff61\u0354", + "output": null + }, + { + "comment": "C1; V5", + "input": "\u200c\u3002\u0354", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": ".xn--yua", + "output": null + }, + { + "comment": "C1; V5", + "input": "xn--0ug.xn--yua", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83a\udd25\udb40\udd6e\uff0e\u1844\u10ae", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83a\udd25\udb40\udd6e.\u1844\u10ae", + "output": null + }, + { + "input": "\ud83a\udd25\udb40\udd6e.\u1844\u2d0e", + "output": "xn--de6h.xn--37e857h" + }, + { + "comment": "P1; V6", + "input": "\ud83a\udd03\udb40\udd6e.\u1844\u10ae", + "output": null + }, + { + "input": "\ud83a\udd03\udb40\udd6e.\u1844\u2d0e", + "output": "xn--de6h.xn--37e857h" + }, + { + "input": "xn--de6h.xn--37e857h", + "output": "xn--de6h.xn--37e857h" + }, + { + "input": "\ud83a\udd25.\u1844\u2d0e", + "output": "xn--de6h.xn--37e857h" + }, + { + "comment": "P1; V6", + "input": "\ud83a\udd03.\u1844\u10ae", + "output": null + }, + { + "input": "\ud83a\udd03.\u1844\u2d0e", + "output": "xn--de6h.xn--37e857h" + }, + { + "comment": "V6", + "input": "xn--de6h.xn--mnd799a", + "output": null + }, + { + "input": "\ud83a\udd25\udb40\udd6e\uff0e\u1844\u2d0e", + "output": "xn--de6h.xn--37e857h" + }, + { + "comment": "P1; V6", + "input": "\ud83a\udd03\udb40\udd6e\uff0e\u1844\u10ae", + "output": null + }, + { + "input": "\ud83a\udd03\udb40\udd6e\uff0e\u1844\u2d0e", + "output": "xn--de6h.xn--37e857h" + }, + { + "comment": "P1; V6", + "input": "\ud83a\udd25.\u1844\u10ae", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0fa4\ud986\udd2f\uff0e\ud835\udfed\u10bb", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0fa4\ud986\udd2f.1\u10bb", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0fa4\ud986\udd2f.1\u2d1b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--0fd40533g.xn--1-tws", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--0fd40533g.xn--1-q1g", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0fa4\ud986\udd2f\uff0e\ud835\udfed\u2d1b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c2\ud9d5\udf0c\uff18.\ud83a\udf64", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c2\ud9d5\udf0c8.\ud83a\udf64", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03a3\ud9d5\udf0c8.\ud83a\udf64", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c3\ud9d5\udf0c8.\ud83a\udf64", + "output": null + }, + { + "comment": "V6", + "input": "xn--8-zmb14974n.xn--su6h", + "output": null + }, + { + "comment": "V6", + "input": "xn--8-xmb44974n.xn--su6h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03a3\ud9d5\udf0c\uff18.\ud83a\udf64", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c3\ud9d5\udf0c\uff18.\ud83a\udf64", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u200c\uae03.\u69b6-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u200c\u1100\u1173\u11b2.\u69b6-", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "xn--ej0b.xn----d87b", + "output": "xn--ej0b.xn----d87b" + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn--0ug3307c.xn----d87b", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ub253\u6cd3\ud833\udd7d.\u09cd\u200d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1102\u1170\u11be\u6cd3\ud833\udd7d.\u09cd\u200d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--lwwp69lqs7m.xn--b7b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--lwwp69lqs7m.xn--b7b605i", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bf3\u10b1\u115f\uff0e\ud804\udd34\u2132", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bf3\u10b1\u115f.\ud804\udd34\u2132", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bf3\u2d11\u115f.\ud804\udd34\u214e", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bf3\u10b1\u115f.\ud804\udd34\u214e", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--pnd26a55x.xn--73g3065g", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--osd925cvyn.xn--73g3065g", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--pnd26a55x.xn--f3g7465g", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bf3\u2d11\u115f\uff0e\ud804\udd34\u214e", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bf3\u10b1\u115f\uff0e\ud804\udd34\u214e", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u00c5\ub444-\uff0e\u200c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "A\u030a\u1103\u116d\u11b7-\uff0e\u200c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u00c5\ub444-.\u200c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "A\u030a\u1103\u116d\u11b7-.\u200c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "a\u030a\u1103\u116d\u11b7-.\u200c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u00e5\ub444-.\u200c", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "xn----1fa1788k.", + "output": "xn----1fa1788k." + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn----1fa1788k.xn--0ug", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "a\u030a\u1103\u116d\u11b7-\uff0e\u200c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u00e5\ub444-\uff0e\u200c", + "output": null + }, + { + "comment": "C1; C2; P1; V5; V6", + "input": "\ub8f1\u200d\ud880\udf68\u200c\u3002\ud836\ude16\ufe12", + "output": null + }, + { + "comment": "C1; C2; P1; V5; V6", + "input": "\u1105\u116e\u11b0\u200d\ud880\udf68\u200c\u3002\ud836\ude16\ufe12", + "output": null + }, + { + "comment": "C1; C2; V5", + "input": "\ub8f1\u200d\ud880\udf68\u200c\u3002\ud836\ude16\u3002", + "output": null + }, + { + "comment": "C1; C2; V5", + "input": "\u1105\u116e\u11b0\u200d\ud880\udf68\u200c\u3002\ud836\ude16\u3002", + "output": null + }, + { + "comment": "V5", + "input": "xn--ct2b0738h.xn--772h.", + "output": null + }, + { + "comment": "C1; C2; V5", + "input": "xn--0ugb3358ili2v.xn--772h.", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ct2b0738h.xn--y86cl899a", + "output": null + }, + { + "comment": "C1; C2; V5; V6", + "input": "xn--0ugb3358ili2v.xn--y86cl899a", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud83c\udd04\uff0e\u1cdc\u2488\u00df", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud83c\udd04\uff0e\u1cdc\u2488SS", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud83c\udd04\uff0e\u1cdc\u2488ss", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud83c\udd04\uff0e\u1cdc\u2488Ss", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--x07h.xn--ss-k1r094b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--x07h.xn--zca344lmif", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\u1bf3.-\u900b\ud98e\uddad\udb25\ude6e", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--1zf.xn----483d46987byr50b", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u0756\u3002\u3164\u200d\u03c2", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u0756\u3002\u1160\u200d\u03c2", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u0756\u3002\u1160\u200d\u03a3", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u0756\u3002\u1160\u200d\u03c3", + "output": null + }, + { + "comment": "V6", + "input": "xn--9ob.xn--4xa380e", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--9ob.xn--4xa380ebol", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--9ob.xn--3xa580ebol", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u0756\u3002\u3164\u200d\u03a3", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u0756\u3002\u3164\u200d\u03c3", + "output": null + }, + { + "comment": "V6", + "input": "xn--9ob.xn--4xa574u", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--9ob.xn--4xa795lq2l", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--9ob.xn--3xa995lq2l", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u1846\u10a3\uff61\udb3a\udca7\u0315\u200d\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u1846\u10a3\u3002\udb3a\udca7\u0315\u200d\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u1846\u2d03\u3002\udb3a\udca7\u0315\u200d\u200d", + "output": null + }, + { + "comment": "V6", + "input": "xn--57e237h.xn--5sa98523p", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--57e237h.xn--5sa649la993427a", + "output": null + }, + { + "comment": "V6", + "input": "xn--bnd320b.xn--5sa98523p", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--bnd320b.xn--5sa649la993427a", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u1846\u2d03\uff61\udb3a\udca7\u0315\u200d\u200d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud838\udc28\uff61\u1b44\uda45\udee8\ud838\udf87", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud838\udc28\u3002\u1b44\uda45\udee8\ud838\udf87", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--mi4h.xn--1uf6843smg20c", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u189b\udb60\udd5f\u00df.\u1327", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u189b\udb60\udd5fSS.\u1327", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u189b\udb60\udd5fss.\u1327", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u189b\udb60\udd5fSs.\u1327", + "output": null + }, + { + "comment": "V6", + "input": "xn--ss-7dp66033t.xn--p5d", + "output": null + }, + { + "comment": "V6", + "input": "xn--zca562jc642x.xn--p5d", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u2b92\u200c.\ud909\ude97\u200c", + "output": null + }, + { + "comment": "V6", + "input": "xn--b9i.xn--5p9y", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ugx66b.xn--0ugz2871c", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u00df\uff61\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u00df\u3002\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "input": "\u00df\u3002\ud800\udef3\u2d0c\u0fb8", + "output": "xn--zca.xn--lgd921mvv0m" + }, + { + "comment": "P1; V6", + "input": "SS\u3002\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "input": "ss\u3002\ud800\udef3\u2d0c\u0fb8", + "output": "ss.xn--lgd921mvv0m" + }, + { + "comment": "P1; V6", + "input": "Ss\u3002\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "comment": "V6", + "input": "ss.xn--lgd10cu829c", + "output": null + }, + { + "input": "ss.xn--lgd921mvv0m", + "output": "ss.xn--lgd921mvv0m" + }, + { + "input": "ss.\ud800\udef3\u2d0c\u0fb8", + "output": "ss.xn--lgd921mvv0m" + }, + { + "comment": "P1; V6", + "input": "SS.\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "comment": "P1; V6", + "input": "Ss.\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "input": "xn--zca.xn--lgd921mvv0m", + "output": "xn--zca.xn--lgd921mvv0m" + }, + { + "input": "\u00df.\ud800\udef3\u2d0c\u0fb8", + "output": "xn--zca.xn--lgd921mvv0m" + }, + { + "comment": "V6", + "input": "xn--zca.xn--lgd10cu829c", + "output": null + }, + { + "input": "\u00df\uff61\ud800\udef3\u2d0c\u0fb8", + "output": "xn--zca.xn--lgd921mvv0m" + }, + { + "comment": "P1; V6", + "input": "SS\uff61\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "input": "ss\uff61\ud800\udef3\u2d0c\u0fb8", + "output": "ss.xn--lgd921mvv0m" + }, + { + "comment": "P1; V6", + "input": "Ss\uff61\ud800\udef3\u10ac\u0fb8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1a5a\ud82e\udd9d\u0c4d\u3002\ud829\udf6c\ud835\udff5", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1a5a\ud82e\udd9d\u0c4d\u3002\ud829\udf6c9", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--lqc703ebm93a.xn--9-000p", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\u1856\uff61\u031f\ud91d\udee8\u0b82-", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\u1856\u3002\u031f\ud91d\udee8\u0b82-", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--m8e.xn----mdb555dkk71m", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83c\udd07\u4f10\ufe12.\ud831\ude5a\ua8c4", + "output": null + }, + { + "comment": "V6", + "input": "xn--woqs083bel0g.xn--0f9ao925c", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\udb40\udda0\uff0e\ud99d\udc34\udaf1\udfc8", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\udb40\udda0.\ud99d\udc34\udaf1\udfc8", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--rx21bhv12i", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "-.\u1886\udb47\udca3-", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "-.xn----pbkx6497q", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0\uff0e-\ud835\udffb\u00df", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0.-5\u00df", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0.-5SS", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0.-5ss", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--t960e.-5ss", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--t960e.xn---5-hia", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0\uff0e-\ud835\udffbSS", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0\uff0e-\ud835\udffbss", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0\uff0e-\ud835\udffbSs", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udafd\udcb0.-5Ss", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\ud802\ude3f.\ud83e\udd12\u10c5\uda06\udfb6", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\ud802\ude3f.\ud83e\udd12\u2d25\uda06\udfb6", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--0s9c.xn--tljz038l0gz4b", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug9533g.xn--tljz038l0gz4b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--0s9c.xn--9nd3211w0gz4b", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug9533g.xn--9nd3211w0gz4b", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud894\udec5\u3002\u00df\ud873\udd69\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud894\udec5\u3002SS\ud873\udd69\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud894\udec5\u3002ss\ud873\udd69\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud894\udec5\u3002Ss\ud873\udd69\u200d", + "output": null + }, + { + "comment": "V6", + "input": "xn--ey1p.xn--ss-eq36b", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--ey1p.xn--ss-n1tx0508a", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--ey1p.xn--zca870nz438b", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u248b\uff61\u2488\u200d\uda8f\udd22", + "output": null + }, + { + "comment": "C2; P1; V6; A4_2 (ignored)", + "input": "4.\u30021.\u200d\uda8f\udd22", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": "4..1.xn--sf51d", + "output": null + }, + { + "comment": "C2; V6; A4_2 (ignored)", + "input": "4..1.xn--1ug64613i", + "output": null + }, + { + "comment": "V6", + "input": "xn--wsh.xn--tsh07994h", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--wsh.xn--1ug58o74922a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10b3\ud805\udf2b\u200d\uda1e\udf53\uff0e\u06a7\ud807\udc36", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10b3\ud805\udf2b\u200d\uda1e\udf53.\u06a7\ud807\udc36", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d13\ud805\udf2b\u200d\uda1e\udf53.\u06a7\ud807\udc36", + "output": null + }, + { + "comment": "V6", + "input": "xn--blj6306ey091d.xn--9jb4223l", + "output": null + }, + { + "comment": "V6", + "input": "xn--1ugy52cym7p7xu5e.xn--9jb4223l", + "output": null + }, + { + "comment": "V6", + "input": "xn--rnd8945ky009c.xn--9jb4223l", + "output": null + }, + { + "comment": "V6", + "input": "xn--rnd479ep20q7x12e.xn--9jb4223l", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d13\ud805\udf2b\u200d\uda1e\udf53\uff0e\u06a7\ud807\udc36", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud802\ude3f.\ud83c\udd06\u2014", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--0s9c.xn--8ug8324p", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\uda10\udeb1\ud8c6\uddae\u06f8\u3002\udb43\udfad-", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--lmb18944c0g2z.xn----2k81m", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83d\udf85\udb43\udce1\udb30\udf59.\ud989\uddb7", + "output": null + }, + { + "comment": "V6", + "input": "xn--ie9hi1349bqdlb.xn--oj69a", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\u20e7\ud97e\udc4e-\uda6e\udcdd.4\u10a4\u200c", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\u20e7\ud97e\udc4e-\uda6e\udcdd.4\u2d04\u200c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn----9snu5320fi76w.xn--4-ivs", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn----9snu5320fi76w.xn--4-sgn589c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn----9snu5320fi76w.xn--4-f0g", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn----9snu5320fi76w.xn--4-f0g649i", + "output": null + }, + { + "input": "\u16ad\uff61\ud834\udf20\u00df\ud81a\udef1", + "output": "xn--hwe.xn--zca4946pblnc" + }, + { + "input": "\u16ad\u3002\ud834\udf20\u00df\ud81a\udef1", + "output": "xn--hwe.xn--zca4946pblnc" + }, + { + "input": "\u16ad\u3002\ud834\udf20SS\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad\u3002\ud834\udf20ss\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad\u3002\ud834\udf20Ss\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "xn--hwe.xn--ss-ci1ub261a", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad.\ud834\udf20ss\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad.\ud834\udf20SS\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad.\ud834\udf20Ss\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "xn--hwe.xn--zca4946pblnc", + "output": "xn--hwe.xn--zca4946pblnc" + }, + { + "input": "\u16ad.\ud834\udf20\u00df\ud81a\udef1", + "output": "xn--hwe.xn--zca4946pblnc" + }, + { + "input": "\u16ad\uff61\ud834\udf20SS\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad\uff61\ud834\udf20ss\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "input": "\u16ad\uff61\ud834\udf20Ss\ud81a\udef1", + "output": "xn--hwe.xn--ss-ci1ub261a" + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734\uff0e\ud802\ude3a\u00c9\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734\uff0e\ud802\ude3aE\u0301\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734.\ud802\ude3a\u00c9\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734.\ud802\ude3aE\u0301\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734.\ud802\ude3ae\u0301\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734.\ud802\ude3a\u00e9\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--c0e34564d.xn--9ca207st53lg3f", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734\uff0e\ud802\ude3ae\u0301\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud8fc\udc47\u1734\uff0e\ud802\ude3a\u00e9\u2b13\ud804\udd34", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "xn--09e4694e..xn--ye6h", + "output": "xn--09e4694e..xn--ye6h" + }, + { + "comment": "P1; V5; V6", + "input": "\u10c3\uff0e\u0653\u18a4", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u10c3.\u0653\u18a4", + "output": null + }, + { + "comment": "V5", + "input": "\u2d23.\u0653\u18a4", + "output": null + }, + { + "comment": "V5", + "input": "xn--rlj.xn--vhb294g", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--7nd.xn--vhb294g", + "output": null + }, + { + "comment": "V5", + "input": "\u2d23\uff0e\u0653\u18a4", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813\uff0e\uc2c9\ud9d0\uddbb\u10c4\ud9ca\udc50", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813\uff0e\u1109\u1174\u11b0\ud9d0\uddbb\u10c4\ud9ca\udc50", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813.\uc2c9\ud9d0\uddbb\u10c4\ud9ca\udc50", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813.\u1109\u1174\u11b0\ud9d0\uddbb\u10c4\ud9ca\udc50", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813.\u1109\u1174\u11b0\ud9d0\uddbb\u2d24\ud9ca\udc50", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813.\uc2c9\ud9d0\uddbb\u2d24\ud9ca\udc50", + "output": null + }, + { + "comment": "V6", + "input": "xn--oub.xn--sljz109bpe25dviva", + "output": null + }, + { + "comment": "V6", + "input": "xn--oub.xn--8nd9522gpe69cviva", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813\uff0e\u1109\u1174\u11b0\ud9d0\uddbb\u2d24\ud9ca\udc50", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb40\udd08\u0813\uff0e\uc2c9\ud9d0\uddbb\u2d24\ud9ca\udc50", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\ud804\udc45\u3002-", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--210d.-", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\ua866\u1851\u200d\u2488\u3002\ud800\udee3-", + "output": null + }, + { + "comment": "C2; V3 (ignored); A4_2 (ignored)", + "input": "\ua866\u1851\u200d1.\u3002\ud800\udee3-", + "output": null + }, + { + "comment": "V3 (ignored); A4_2 (ignored)", + "input": "xn--1-o7j0610f..xn----381i", + "output": "xn--1-o7j0610f..xn----381i" + }, + { + "comment": "C2; V3 (ignored); A4_2 (ignored)", + "input": "xn--1-o7j663bdl7m..xn----381i", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--h8e863drj7h.xn----381i", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn--h8e470bl0d838o.xn----381i", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u2488\u4c39\u200d-\u3002\uc6c8", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u2488\u4c39\u200d-\u3002\u110b\u116e\u11bf", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "1.\u4c39\u200d-\u3002\uc6c8", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "1.\u4c39\u200d-\u3002\u110b\u116e\u11bf", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "1.xn----zw5a.xn--kp5b", + "output": "1.xn----zw5a.xn--kp5b" + }, + { + "comment": "C2; V3 (ignored)", + "input": "1.xn----tgnz80r.xn--kp5b", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----dcp160o.xn--kp5b", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----tgnx5rjr6c.xn--kp5b", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u3066\u3002\u200c\udb43\udcfd\u07f3", + "output": null + }, + { + "comment": "V6", + "input": "xn--m9j.xn--rtb10784p", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--m9j.xn--rtb154j9l73w", + "output": null + }, + { + "comment": "V5", + "input": "\u03c2\uff61\ua9c0\u06e7", + "output": null + }, + { + "comment": "V5", + "input": "\u03c2\u3002\ua9c0\u06e7", + "output": null + }, + { + "comment": "V5", + "input": "\u03a3\u3002\ua9c0\u06e7", + "output": null + }, + { + "comment": "V5", + "input": "\u03c3\u3002\ua9c0\u06e7", + "output": null + }, + { + "comment": "V5", + "input": "xn--4xa.xn--3lb1944f", + "output": null + }, + { + "comment": "V5", + "input": "xn--3xa.xn--3lb1944f", + "output": null + }, + { + "comment": "V5", + "input": "\u03a3\uff61\ua9c0\u06e7", + "output": null + }, + { + "comment": "V5", + "input": "\u03c3\uff61\ua9c0\u06e7", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0bcd\udb56\udec5\ud9f0\ude51.\u10a2\u10b5", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0bcd\udb56\udec5\ud9f0\ude51.\u2d02\u2d15", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0bcd\udb56\udec5\ud9f0\ude51.\u10a2\u2d15", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--xmc83135idcxza.xn--9md086l", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--xmc83135idcxza.xn--tkjwb", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--xmc83135idcxza.xn--9md2b", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u1c32\ud83c\udd08\u2f9b\u05a6\uff0e\u200d\uda7e\udd64\u07fd", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--xcb756i493fwi5o.xn--1tb13454l", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--xcb756i493fwi5o.xn--1tb334j1197q", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1897\uff61\u04c0\ud934\udd3b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1897\u3002\u04c0\ud934\udd3b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1897\u3002\u04cf\ud934\udd3b", + "output": null + }, + { + "comment": "V6", + "input": "xn--hbf.xn--s5a83117e", + "output": null + }, + { + "comment": "V6", + "input": "xn--hbf.xn--d5a86117e", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1897\uff61\u04cf\ud934\udd3b", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "-\ud800\udef7\ud81b\udf91\u3002\udb40\uddac", + "output": "xn----991iq40y." + }, + { + "comment": "V3 (ignored)", + "input": "xn----991iq40y.", + "output": "xn----991iq40y." + }, + { + "comment": "P1; V5; V6", + "input": "\ud807\udc98\udb40\udd12\ud80d\udc61\uff61\ud835\udfea\u10bc", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud807\udc98\udb40\udd12\ud80d\udc61\u30028\u10bc", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud807\udc98\udb40\udd12\ud80d\udc61\u30028\u2d1c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--7m3d291b.xn--8-vws", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--7m3d291b.xn--8-s1g", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud807\udc98\udb40\udd12\ud80d\udc61\uff61\ud835\udfea\u2d1c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bab\uff61\ud83c\udc89\udb40\udc70", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1bab\u3002\ud83c\udc89\udb40\udc70", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--zxf.xn--fx7ho0250c", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\udb71\udeb6\udba0\uded6\uda1a\ude70-\u3002\u200c", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----7i12hu122k9ire.", + "output": null + }, + { + "comment": "C1; V6; V3 (ignored)", + "input": "xn----7i12hu122k9ire.xn--0ug", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ufe12\uff0e\ufe2f\ud805\udc42", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ufe12\uff0e\ud805\udc42\ufe2f", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "\u3002.\ud805\udc42\ufe2f", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "..xn--s96cu30b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--y86c.xn--s96cu30b", + "output": null + }, + { + "comment": "C2; V5", + "input": "\ua92c\u3002\u200d", + "output": null + }, + { + "comment": "V5", + "input": "xn--zi9a.", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--zi9a.xn--1ug", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\udb58\ude04\u3002-", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--xm38e.-", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0330\uff0e\udb81\udf31\u8680", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0330.\udb81\udf31\u8680", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--xta.xn--e91aw9417e", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud83e\udc9f\ud83c\udd08\u200d\ua84e\uff61\u0f84", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--nc9aq743ds0e.xn--3ed", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--1ug4874cfd0kbmg.xn--3ed", + "output": null + }, + { + "comment": "V5", + "input": "\ua854\u3002\u1039\u1887", + "output": null + }, + { + "comment": "V5", + "input": "xn--tc9a.xn--9jd663b", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\ud880\udd67\ud94e\ude60-\uff0e\uabed-\u609c", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\ud880\udd67\ud94e\ude60-.\uabed-\u609c", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----7m53aj640l.xn----8f4br83t", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u1849\ud899\udce7\u2b1e\u189c.-\u200d\ud83a\udcd1\u202e", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--87e0ol04cdl39e.xn----qinu247r", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn--87e0ol04cdl39e.xn----ugn5e3763s", + "output": null + }, + { + "input": "\ud83a\udd53\uff0e\u0718", + "output": "xn--of6h.xn--inb" + }, + { + "input": "\ud83a\udd53.\u0718", + "output": "xn--of6h.xn--inb" + }, + { + "input": "xn--of6h.xn--inb", + "output": "xn--of6h.xn--inb" + }, + { + "comment": "V3 (ignored)", + "input": "\udb40\udd3d-\uff0e-\u0dca", + "output": "-.xn----ptf" + }, + { + "comment": "V3 (ignored)", + "input": "\udb40\udd3d-.-\u0dca", + "output": "-.xn----ptf" + }, + { + "comment": "V3 (ignored)", + "input": "-.xn----ptf", + "output": "-.xn----ptf" + }, + { + "comment": "P1; V6", + "input": "\u10ba\ud800\udef8\udb40\udd04\u3002\ud835\udfdd\ud7f6\u103a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10ba\ud800\udef8\udb40\udd04\u30025\ud7f6\u103a", + "output": null + }, + { + "input": "\u2d1a\ud800\udef8\udb40\udd04\u30025\ud7f6\u103a", + "output": "xn--ilj2659d.xn--5-dug9054m" + }, + { + "input": "xn--ilj2659d.xn--5-dug9054m", + "output": "xn--ilj2659d.xn--5-dug9054m" + }, + { + "input": "\u2d1a\ud800\udef8.5\ud7f6\u103a", + "output": "xn--ilj2659d.xn--5-dug9054m" + }, + { + "comment": "P1; V6", + "input": "\u10ba\ud800\udef8.5\ud7f6\u103a", + "output": null + }, + { + "comment": "V6", + "input": "xn--ynd2415j.xn--5-dug9054m", + "output": null + }, + { + "input": "\u2d1a\ud800\udef8\udb40\udd04\u3002\ud835\udfdd\ud7f6\u103a", + "output": "xn--ilj2659d.xn--5-dug9054m" + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u200d-\u1839\ufe6a.\u1de1\u1922", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u200d-\u1839%.\u1de1\u1922", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "xn---%-u4o.xn--gff52t", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "xn---%-u4oy48b.xn--gff52t", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----c6jx047j.xn--gff52t", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn----c6j614b1z4v.xn--gff52t", + "output": null + }, + { + "input": "\u0723\u05a3\uff61\u332a", + "output": "xn--ucb18e.xn--eck4c5a" + }, + { + "input": "\u0723\u05a3\u3002\u30cf\u30a4\u30c4", + "output": "xn--ucb18e.xn--eck4c5a" + }, + { + "input": "xn--ucb18e.xn--eck4c5a", + "output": "xn--ucb18e.xn--eck4c5a" + }, + { + "input": "\u0723\u05a3.\u30cf\u30a4\u30c4", + "output": "xn--ucb18e.xn--eck4c5a" + }, + { + "comment": "P1; V6", + "input": "\ud84e\ude6b\uff0e\ud9f1\udc72", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud84e\ude6b.\ud9f1\udc72", + "output": null + }, + { + "comment": "V6", + "input": "xn--td3j.xn--4628b", + "output": null + }, + { + "input": "xn--skb", + "output": "xn--skb" + }, + { + "input": "\u06b9", + "output": "xn--skb" + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u0c4d\ud836\ude3e\u05a9\ud835\udfed\u3002-\ud805\udf28", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u0c4d\ud836\ude3e\u05a91\u3002-\ud805\udf28", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--1-rfc312cdp45c.xn----nq0j", + "output": null + }, + { + "comment": "P1; V6", + "input": "\uda4f\udfc8\u3002\ub64f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\uda4f\udfc8\u3002\u1104\u116b\u11ae", + "output": null + }, + { + "comment": "V6", + "input": "xn--ph26c.xn--281b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud916\ude1a\udb40\udd0c\udb07\udf40\u1840.\u08b6", + "output": null + }, + { + "comment": "V6", + "input": "xn--z7e98100evc01b.xn--czb", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\uff61\ud8d4\udc5b", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u3002\ud8d4\udc5b", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--6x4u", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug.xn--6x4u", + "output": null + }, + { + "comment": "C1; V5", + "input": "\ud805\uddbf\ud836\ude14.\u185f\ud805\uddbf\u1b42\u200c", + "output": null + }, + { + "comment": "V5", + "input": "xn--461dw464a.xn--v8e29loy65a", + "output": null + }, + { + "comment": "C1; V5", + "input": "xn--461dw464a.xn--v8e29ldzfo952a", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ud02c-?\ud99b\udcd2.\u200c\u0ac5\udb67\ude24\u06f4", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.\u200c\u0ac5\udb67\ude24\u06f4", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "xn---?-6g4k75207c.xn--hmb76q74166b", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "xn---?-6g4k75207c.xn--hmb76q48y18505a", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud02c-?\ud99b\udcd2.xn--hmb76q74166b", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.xn--hmb76q74166b", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.XN--HMB76Q74166B", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud02c-?\ud99b\udcd2.XN--HMB76Q74166B", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud02c-?\ud99b\udcd2.Xn--Hmb76q74166b", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.Xn--Hmb76q74166b", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ud02c-?\ud99b\udcd2.xn--hmb76q48y18505a", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.xn--hmb76q48y18505a", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.XN--HMB76Q48Y18505A", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ud02c-?\ud99b\udcd2.XN--HMB76Q48Y18505A", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ud02c-?\ud99b\udcd2.Xn--Hmb76q48y18505a", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u110f\u1170\u11bb-?\ud99b\udcd2.Xn--Hmb76q48y18505a", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u252e\udb40\uddd0\uff0e\u0c00\u0c4d\u1734\u200d", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u252e\udb40\uddd0.\u0c00\u0c4d\u1734\u200d", + "output": null + }, + { + "comment": "V5", + "input": "xn--kxh.xn--eoc8m432a", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--1ug04r.xn--eoc8m432a40i", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udaa5\udeaa\uff61\ud83c\udd02", + "output": null + }, + { + "comment": "V6", + "input": "xn--n433d.xn--v07h", + "output": null + }, + { + "comment": "V5", + "input": "\ud804\udf68\u520d.\ud83d\udee6", + "output": null + }, + { + "comment": "V5", + "input": "xn--rbry728b.xn--y88h", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\udb40\udf0f3\uff61\u1bf1\ud835\udfd2", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\udb40\udf0f3\u3002\u1bf14", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--3-ib31m.xn--4-pql", + "output": null + }, + { + "comment": "V5", + "input": "\u034a\uff0e\ud802\ude0e", + "output": null + }, + { + "comment": "V5", + "input": "\u034a.\ud802\ude0e", + "output": null + }, + { + "comment": "V5", + "input": "xn--oua.xn--mr9c", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ua846\u3002\u2183\u0fb5\ub1ae-", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ua846\u3002\u2183\u0fb5\u1102\u116a\u11c1-", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "\ua846\u3002\u2184\u0fb5\u1102\u116a\u11c1-", + "output": "xn--fc9a.xn----qmg097k469k" + }, + { + "comment": "V3 (ignored)", + "input": "\ua846\u3002\u2184\u0fb5\ub1ae-", + "output": "xn--fc9a.xn----qmg097k469k" + }, + { + "comment": "V3 (ignored)", + "input": "xn--fc9a.xn----qmg097k469k", + "output": "xn--fc9a.xn----qmg097k469k" + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--fc9a.xn----qmg787k869k", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud805\udc42\uff61\u200d\udb55\udf80\ud83d\udf95\uda54\udc54", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud805\udc42\u3002\u200d\udb55\udf80\ud83d\udf95\uda54\udc54", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--8v1d.xn--ye9h41035a2qqs", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--8v1d.xn--1ug1386plvx1cd8vya", + "output": null + }, + { + "input": "\u00df\u09c1\u1ded\u3002\u06208\u2085", + "output": "xn--zca266bwrr.xn--85-psd" + }, + { + "input": "\u00df\u09c1\u1ded\u3002\u062085", + "output": "xn--zca266bwrr.xn--85-psd" + }, + { + "input": "SS\u09c1\u1ded\u3002\u062085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "ss\u09c1\u1ded\u3002\u062085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "Ss\u09c1\u1ded\u3002\u062085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "xn--ss-e2f077r.xn--85-psd", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "ss\u09c1\u1ded.\u062085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "SS\u09c1\u1ded.\u062085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "Ss\u09c1\u1ded.\u062085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "xn--zca266bwrr.xn--85-psd", + "output": "xn--zca266bwrr.xn--85-psd" + }, + { + "input": "\u00df\u09c1\u1ded.\u062085", + "output": "xn--zca266bwrr.xn--85-psd" + }, + { + "input": "SS\u09c1\u1ded\u3002\u06208\u2085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "ss\u09c1\u1ded\u3002\u06208\u2085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "Ss\u09c1\u1ded\u3002\u06208\u2085", + "output": "xn--ss-e2f077r.xn--85-psd" + }, + { + "input": "\ufe0d\u0a9b\u3002\u5d68", + "output": "xn--6dc.xn--tot" + }, + { + "input": "xn--6dc.xn--tot", + "output": "xn--6dc.xn--tot" + }, + { + "input": "\u0a9b.\u5d68", + "output": "xn--6dc.xn--tot" + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "-\u200c\u2499\ud802\udee5\uff61\ud836\ude35", + "output": null + }, + { + "comment": "C1; V5; V3 (ignored)", + "input": "-\u200c18.\ud802\udee5\u3002\ud836\ude35", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "-18.xn--rx9c.xn--382h", + "output": null + }, + { + "comment": "C1; V5; V3 (ignored)", + "input": "xn---18-9m0a.xn--rx9c.xn--382h", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----ddps939g.xn--382h", + "output": null + }, + { + "comment": "C1; V5; V6; V3 (ignored)", + "input": "xn----sgn18r3191a.xn--382h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ufe05\ufe12\u3002\ud858\udc3e\u1ce0", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "\ufe05\u3002\u3002\ud858\udc3e\u1ce0", + "output": "..xn--t6f5138v" + }, + { + "comment": "A4_2 (ignored)", + "input": "..xn--t6f5138v", + "output": "..xn--t6f5138v" + }, + { + "comment": "V6", + "input": "xn--y86c.xn--t6f5138v", + "output": null + }, + { + "input": "xn--t6f5138v", + "output": "xn--t6f5138v" + }, + { + "input": "\ud858\udc3e\u1ce0", + "output": "xn--t6f5138v" + }, + { + "comment": "P1; V6", + "input": "\uda7b\udd5b\u0613.\u10b5", + "output": null + }, + { + "comment": "P1; V6", + "input": "\uda7b\udd5b\u0613.\u2d15", + "output": null + }, + { + "comment": "V6", + "input": "xn--1fb94204l.xn--dlj", + "output": null + }, + { + "comment": "V6", + "input": "xn--1fb94204l.xn--tnd", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\udb40\udd37\uff61\uda09\udc41", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\udb40\udd37\u3002\uda09\udc41", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--w720c", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug.xn--w720c", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2488\u0dd6\u7105.\udb1e\udc59\u200d\ua85f", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "1.\u0dd6\u7105.\udb1e\udc59\u200d\ua85f", + "output": null + }, + { + "comment": "V5; V6", + "input": "1.xn--t1c6981c.xn--4c9a21133d", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "1.xn--t1c6981c.xn--1ugz184c9lw7i", + "output": null + }, + { + "comment": "V6", + "input": "xn--t1c337io97c.xn--4c9a21133d", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--t1c337io97c.xn--1ugz184c9lw7i", + "output": null + }, + { + "comment": "V5", + "input": "\ud804\uddc0\u258d.\u205e\u1830", + "output": null + }, + { + "comment": "V5", + "input": "xn--9zh3057f.xn--j7e103b", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "-3.\u200d\u30cc\u1895", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "-3.xn--fbf115j", + "output": "-3.xn--fbf115j" + }, + { + "comment": "C2; V3 (ignored)", + "input": "-3.xn--fbf739aq5o", + "output": null + }, + { + "comment": "V5", + "input": "\ud802\ude3f\udb40\udd8c\u9e2e\ud805\udeb6.\u03c2", + "output": null + }, + { + "comment": "V5", + "input": "\ud802\ude3f\udb40\udd8c\u9e2e\ud805\udeb6.\u03a3", + "output": null + }, + { + "comment": "V5", + "input": "\ud802\ude3f\udb40\udd8c\u9e2e\ud805\udeb6.\u03c3", + "output": null + }, + { + "comment": "V5", + "input": "xn--l76a726rt2h.xn--4xa", + "output": null + }, + { + "comment": "V5", + "input": "xn--l76a726rt2h.xn--3xa", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u03c2-\u3002\u200c\ud835\udfed-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u03c2-\u3002\u200c1-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u03a3-\u3002\u200c1-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u03c3-\u3002\u200c1-", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "xn----zmb.1-", + "output": "xn----zmb.1-" + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn----zmb.xn--1--i1t", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn----xmb.xn--1--i1t", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u03a3-\u3002\u200c\ud835\udfed-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u03c3-\u3002\u200c\ud835\udfed-", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1734-\u0ce2\uff0e\udb40\udd29\u10a4", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1734-\u0ce2.\udb40\udd29\u10a4", + "output": null + }, + { + "comment": "V5", + "input": "\u1734-\u0ce2.\udb40\udd29\u2d04", + "output": null + }, + { + "comment": "V5", + "input": "xn----ggf830f.xn--vkj", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn----ggf830f.xn--cnd", + "output": null + }, + { + "comment": "V5", + "input": "\u1734-\u0ce2\uff0e\udb40\udd29\u2d04", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u200d\u3002\ud838\udc18\u2488\ua84d\u64c9", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u3002\ud838\udc181.\ua84d\u64c9", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": ".xn--1-1p4r.xn--s7uv61m", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--1ug.xn--1-1p4r.xn--s7uv61m", + "output": null + }, + { + "comment": "V5; V6; A4_2 (ignored)", + "input": ".xn--tsh026uql4bew9p", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--1ug.xn--tsh026uql4bew9p", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2ad0\uff61\u10c0-\udacd\udc22", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2ad0\u3002\u10c0-\udacd\udc22", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2ad0\u3002\u2d20-\udacd\udc22", + "output": null + }, + { + "comment": "V6", + "input": "xn--r3i.xn----2wst7439i", + "output": null + }, + { + "comment": "V6", + "input": "xn--r3i.xn----z1g58579u", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2ad0\uff61\u2d20-\udacd\udc22", + "output": null + }, + { + "comment": "V5", + "input": "\ud805\udc42\u25ca\uff0e\u299f\u2220", + "output": null + }, + { + "comment": "V5", + "input": "\ud805\udc42\u25ca.\u299f\u2220", + "output": null + }, + { + "comment": "V5", + "input": "xn--01h3338f.xn--79g270a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud5c1\udb21\udd99\u0e3a\udb28\udf5a\u3002\u06ba\ud835\udfdc", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1112\u1164\u11bc\udb21\udd99\u0e3a\udb28\udf5a\u3002\u06ba\ud835\udfdc", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud5c1\udb21\udd99\u0e3a\udb28\udf5a\u3002\u06ba4", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1112\u1164\u11bc\udb21\udd99\u0e3a\udb28\udf5a\u3002\u06ba4", + "output": null + }, + { + "comment": "V6", + "input": "xn--o4c1723h8g85gt4ya.xn--4-dvc", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua953.\u033d\ud804\udcbd\u998b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--3j9a.xn--bua0708eqzrd", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\udae2\udedd\uda69\udef8\u200d\uff61\u4716", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\udae2\udedd\uda69\udef8\u200d\u3002\u4716", + "output": null + }, + { + "comment": "V6", + "input": "xn--g138cxw05a.xn--k0o", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug30527h9mxi.xn--k0o", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u186f\u2689\u59f6\ud83c\udd09\uff0e\u06f7\u200d\ud83c\udfaa\u200d", + "output": null + }, + { + "comment": "V6", + "input": "xn--c9e433epi4b3j20a.xn--kmb6733w", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--c9e433epi4b3j20a.xn--kmb859ja94998b", + "output": null + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "\u135f\u1848\u200c\uff0e\ufe12-\ud81b\udf90-", + "output": null + }, + { + "comment": "C1; V5; V3 (ignored); A4_2 (ignored)", + "input": "\u135f\u1848\u200c.\u3002-\ud81b\udf90-", + "output": null + }, + { + "comment": "V5; V3 (ignored); A4_2 (ignored)", + "input": "xn--b7d82w..xn-----pe4u", + "output": null + }, + { + "comment": "C1; V5; V3 (ignored); A4_2 (ignored)", + "input": "xn--b7d82wo4h..xn-----pe4u", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--b7d82w.xn-----c82nz547a", + "output": null + }, + { + "comment": "C1; V5; V6; V3 (ignored)", + "input": "xn--b7d82wo4h.xn-----c82nz547a", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\ud836\ude5c\u3002-\u0b4d\u10ab", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\ud836\ude5c\u3002-\u0b4d\u2d0b", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--792h.xn----bse820x", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--792h.xn----bse632b", + "output": null + }, + { + "comment": "C1", + "input": "\ud835\udff5\u9681\u2bee\uff0e\u180d\u200c", + "output": null + }, + { + "comment": "C1", + "input": "9\u9681\u2bee.\u180d\u200c", + "output": null + }, + { + "input": "xn--9-mfs8024b.", + "output": "xn--9-mfs8024b." + }, + { + "input": "9\u9681\u2bee.", + "output": "xn--9-mfs8024b." + }, + { + "comment": "C1", + "input": "xn--9-mfs8024b.xn--0ug", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\u1bac\u10ac\u200c\u0325\u3002\ud835\udff8", + "output": null + }, + { + "comment": "C1; V5", + "input": "\u1bac\u2d0c\u200c\u0325\u3002\ud835\udff8", + "output": null + }, + { + "input": "xn--2ib43l.xn--te6h", + "output": "xn--2ib43l.xn--te6h" + }, + { + "input": "\u067d\u0943.\ud83a\udd35", + "output": "xn--2ib43l.xn--te6h" + }, + { + "input": "\u067d\u0943.\ud83a\udd13", + "output": "xn--2ib43l.xn--te6h" + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u3002\uffa0\u0f84\u0f96", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u3002\u1160\u0f84\u0f96", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--3ed0b20h", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug.xn--3ed0b20h", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--3ed0by082k", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug.xn--3ed0by082k", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ua9d0\u04c0\u1baa\u08f6\uff0e\ub235", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ua9d0\u04c0\u1baa\u08f6\uff0e\u1102\u116f\u11bc", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ua9d0\u04c0\u1baa\u08f6.\ub235", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ua9d0\u04c0\u1baa\u08f6.\u1102\u116f\u11bc", + "output": null + }, + { + "input": "\ua9d0\u04cf\u1baa\u08f6.\u1102\u116f\u11bc", + "output": "xn--s5a04sn4u297k.xn--2e1b" + }, + { + "input": "\ua9d0\u04cf\u1baa\u08f6.\ub235", + "output": "xn--s5a04sn4u297k.xn--2e1b" + }, + { + "input": "xn--s5a04sn4u297k.xn--2e1b", + "output": "xn--s5a04sn4u297k.xn--2e1b" + }, + { + "comment": "V6", + "input": "xn--d5a07sn4u297k.xn--2e1b", + "output": null + }, + { + "input": "\ua9d0\u04cf\u1baa\u08f6\uff0e\u1102\u116f\u11bc", + "output": "xn--s5a04sn4u297k.xn--2e1b" + }, + { + "input": "\ua9d0\u04cf\u1baa\u08f6\uff0e\ub235", + "output": "xn--s5a04sn4u297k.xn--2e1b" + }, + { + "comment": "P1; V5; V6", + "input": "\ua8ea\uff61\ud818\udd3f\ud804\uddbe\udb40\uddd7", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua8ea\u3002\ud818\udd3f\ud804\uddbe\udb40\uddd7", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--3g9a.xn--ud1dz07k", + "output": null + }, + { + "input": "xn--9hb7344k.", + "output": "xn--9hb7344k." + }, + { + "input": "\ud802\udec7\u0661.", + "output": "xn--9hb7344k." + }, + { + "comment": "P1; V5; V6", + "input": "\u10c5.\ud804\udd33\u32b8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u10c5.\ud804\udd3343", + "output": null + }, + { + "comment": "V5", + "input": "\u2d25.\ud804\udd3343", + "output": null + }, + { + "comment": "V5", + "input": "xn--tlj.xn--43-274o", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--9nd.xn--43-274o", + "output": null + }, + { + "comment": "V5", + "input": "\u2d25.\ud804\udd33\u32b8", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91e\udea8\udb40\udd09\uffa0\u0fb7.\ud9a1\udfb0\ua953", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91e\udea8\udb40\udd09\u1160\u0fb7.\ud9a1\udfb0\ua953", + "output": null + }, + { + "comment": "V6", + "input": "xn--kgd36f9z57y.xn--3j9au7544a", + "output": null + }, + { + "comment": "V6", + "input": "xn--kgd7493jee34a.xn--3j9au7544a", + "output": null + }, + { + "comment": "C1; V5", + "input": "\u0618.\u06f3\u200c\ua953", + "output": null + }, + { + "comment": "V5", + "input": "xn--6fb.xn--gmb0524f", + "output": null + }, + { + "comment": "C1; V5", + "input": "xn--6fb.xn--gmb469jjf1h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u184c\uff0e\ufe12\u1891", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "\u184c.\u3002\u1891", + "output": "xn--c8e..xn--bbf" + }, + { + "comment": "A4_2 (ignored)", + "input": "xn--c8e..xn--bbf", + "output": "xn--c8e..xn--bbf" + }, + { + "comment": "V6", + "input": "xn--c8e.xn--bbf9168i", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83b\uddcf\u3002\u1822\uda0d\ude06", + "output": null + }, + { + "comment": "V6", + "input": "xn--hd7h.xn--46e66060j", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u40b9\udbb9\udd85\ud800\udee6\uff0e\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u40b9\udbb9\udd85\ud800\udee6.\u200d", + "output": null + }, + { + "comment": "V6", + "input": "xn--0on3543c5981i.", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--0on3543c5981i.xn--1ug", + "output": null + }, + { + "input": "\u07e5.\u06b5", + "output": "xn--dtb.xn--okb" + }, + { + "input": "xn--dtb.xn--okb", + "output": "xn--dtb.xn--okb" + }, + { + "comment": "A4_2 (ignored)", + "input": ".xn--3e6h", + "output": ".xn--3e6h" + }, + { + "input": "xn--3e6h", + "output": "xn--3e6h" + }, + { + "input": "\ud83a\udd3f", + "output": "xn--3e6h" + }, + { + "input": "\ud83a\udd1d", + "output": "xn--3e6h" + }, + { + "comment": "C1; V5; V3 (ignored)", + "input": "\u103a\u200d\u200c\u3002-\u200c", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--bkd.-", + "output": null + }, + { + "comment": "C1; V5; V3 (ignored)", + "input": "xn--bkd412fca.xn----sgn", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ufe12\uff61\u1b44\u1849", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "\u3002\u3002\u1b44\u1849", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "..xn--87e93m", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--y86c.xn--87e93m", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "-\u1bab\ufe12\u200d.\ud90b\udd88\ud957\ude53", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "-\u1bab\u3002\u200d.\ud90b\udd88\ud957\ude53", + "output": null + }, + { + "comment": "V6; V3 (ignored); A4_2 (ignored)", + "input": "xn----qml..xn--x50zy803a", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----qml.xn--1ug.xn--x50zy803a", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----qml1407i.xn--x50zy803a", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----qmlv7tw180a.xn--x50zy803a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u06b9\uff0e\u1873\u115f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u06b9.\u1873\u115f", + "output": null + }, + { + "comment": "V6", + "input": "xn--skb.xn--osd737a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u3a1b\ud823\udc4e.\ufe12\ud835\udfd5\u0d01", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "\u3a1b\ud823\udc4e.\u30027\u0d01", + "output": "xn--mbm8237g..xn--7-7hf" + }, + { + "comment": "A4_2 (ignored)", + "input": "xn--mbm8237g..xn--7-7hf", + "output": "xn--mbm8237g..xn--7-7hf" + }, + { + "comment": "V6", + "input": "xn--mbm8237g.xn--7-7hf1526p", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u00df\u200c\uaaf6\u18a5\uff0e\u22b6\u10c1\u10b6", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u00df\u200c\uaaf6\u18a5.\u22b6\u10c1\u10b6", + "output": null + }, + { + "comment": "C1", + "input": "\u00df\u200c\uaaf6\u18a5.\u22b6\u2d21\u2d16", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "SS\u200c\uaaf6\u18a5.\u22b6\u10c1\u10b6", + "output": null + }, + { + "comment": "C1", + "input": "ss\u200c\uaaf6\u18a5.\u22b6\u2d21\u2d16", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "Ss\u200c\uaaf6\u18a5.\u22b6\u10c1\u2d16", + "output": null + }, + { + "comment": "V6", + "input": "xn--ss-4epx629f.xn--5nd703gyrh", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--ss-4ep585bkm5p.xn--5nd703gyrh", + "output": null + }, + { + "input": "xn--ss-4epx629f.xn--ifh802b6a", + "output": "xn--ss-4epx629f.xn--ifh802b6a" + }, + { + "input": "ss\uaaf6\u18a5.\u22b6\u2d21\u2d16", + "output": "xn--ss-4epx629f.xn--ifh802b6a" + }, + { + "comment": "P1; V6", + "input": "SS\uaaf6\u18a5.\u22b6\u10c1\u10b6", + "output": null + }, + { + "comment": "P1; V6", + "input": "Ss\uaaf6\u18a5.\u22b6\u10c1\u2d16", + "output": null + }, + { + "comment": "V6", + "input": "xn--ss-4epx629f.xn--undv409k", + "output": null + }, + { + "comment": "C1", + "input": "xn--ss-4ep585bkm5p.xn--ifh802b6a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--ss-4ep585bkm5p.xn--undv409k", + "output": null + }, + { + "comment": "C1", + "input": "xn--zca682johfi89m.xn--ifh802b6a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--zca682johfi89m.xn--undv409k", + "output": null + }, + { + "comment": "C1", + "input": "\u00df\u200c\uaaf6\u18a5\uff0e\u22b6\u2d21\u2d16", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "SS\u200c\uaaf6\u18a5\uff0e\u22b6\u10c1\u10b6", + "output": null + }, + { + "comment": "C1", + "input": "ss\u200c\uaaf6\u18a5\uff0e\u22b6\u2d21\u2d16", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "Ss\u200c\uaaf6\u18a5\uff0e\u22b6\u10c1\u2d16", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u3002\u03c2\udb40\udc49", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u3002\u03a3\udb40\udc49", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u3002\u03c3\udb40\udc49", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--4xa24344p", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug.xn--4xa24344p", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug.xn--3xa44344p", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\u2492\uda61\ude19\uda8f\udce0\ud805\udcc0.-\udb3a\udc4a", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "11.\uda61\ude19\uda8f\udce0\ud805\udcc0.-\udb3a\udc4a", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "11.xn--uz1d59632bxujd.xn----x310m", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--3shy698frsu9dt1me.xn----x310m", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "-\uff61\u200d", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "-\u3002\u200d", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "-.", + "output": "-." + }, + { + "comment": "C2; V3 (ignored)", + "input": "-.xn--1ug", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u126c\uda12\udc3c\ud8c5\uddf6\uff61\ud802\ude2c\ud835\udfe0", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u126c\uda12\udc3c\ud8c5\uddf6\u3002\ud802\ude2c8", + "output": null + }, + { + "comment": "V6", + "input": "xn--d0d41273c887z.xn--8-ob5i", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u03c2\u200d-.\u10c3\ud859\udfd9", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "\u03c2\u200d-.\u2d23\ud859\udfd9", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u03a3\u200d-.\u10c3\ud859\udfd9", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "\u03c3\u200d-.\u2d23\ud859\udfd9", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "xn----zmb.xn--rlj2573p", + "output": "xn----zmb.xn--rlj2573p" + }, + { + "comment": "C2; V3 (ignored)", + "input": "xn----zmb048s.xn--rlj2573p", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----zmb.xn--7nd64871a", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----zmb048s.xn--7nd64871a", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "xn----xmb348s.xn--rlj2573p", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----xmb348s.xn--7nd64871a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udad6\udf3d.\u8814", + "output": null + }, + { + "comment": "V6", + "input": "xn--g747d.xn--xl2a", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u08e6\u200d\uff0e\ubf3d", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u08e6\u200d\uff0e\u1108\u1168\u11c0", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u08e6\u200d.\ubf3d", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u08e6\u200d.\u1108\u1168\u11c0", + "output": null + }, + { + "comment": "V5", + "input": "xn--p0b.xn--e43b", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--p0b869i.xn--e43b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud8f6\ude3d\uff0e\ud8ef\ude15", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud8f6\ude3d.\ud8ef\ude15", + "output": null + }, + { + "comment": "V6", + "input": "xn--pr3x.xn--rv7w", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud802\udfc0\ud803\ude09\ud83a\uddcf\u3002\ud949\udea7\u2084\u10ab\ud8cb\ude6b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud802\udfc0\ud803\ude09\ud83a\uddcf\u3002\ud949\udea74\u10ab\ud8cb\ude6b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud802\udfc0\ud803\ude09\ud83a\uddcf\u3002\ud949\udea74\u2d0b\ud8cb\ude6b", + "output": null + }, + { + "comment": "V6", + "input": "xn--039c42bq865a.xn--4-wvs27840bnrzm", + "output": null + }, + { + "comment": "V6", + "input": "xn--039c42bq865a.xn--4-t0g49302fnrzm", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud802\udfc0\ud803\ude09\ud83a\uddcf\u3002\ud949\udea7\u2084\u2d0b\ud8cb\ude6b", + "output": null + }, + { + "comment": "V5", + "input": "\ud835\udfd3\u3002\u06d7", + "output": null + }, + { + "comment": "V5", + "input": "5\u3002\u06d7", + "output": null + }, + { + "comment": "V5", + "input": "5.xn--nlb", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\udaab\ude29.\u2f95", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\udaab\ude29.\u8c37", + "output": null + }, + { + "comment": "V6", + "input": "xn--i183d.xn--6g3a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug26167i.xn--6g3a", + "output": null + }, + { + "comment": "C1; C2; P1; V6; V3 (ignored)", + "input": "\ufe12\udafb\udc07\u200d.-\u073c\u200c", + "output": null + }, + { + "comment": "C1; C2; P1; V6; V3 (ignored); A4_2 (ignored)", + "input": "\u3002\udafb\udc07\u200d.-\u073c\u200c", + "output": null + }, + { + "comment": "V6; V3 (ignored); A4_2 (ignored)", + "input": ".xn--hh50e.xn----t2c", + "output": null + }, + { + "comment": "C1; C2; V6; V3 (ignored); A4_2 (ignored)", + "input": ".xn--1ug05310k.xn----t2c071q", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--y86c71305c.xn----t2c", + "output": null + }, + { + "comment": "C1; C2; V6; V3 (ignored)", + "input": "xn--1ug1658ftw26f.xn----t2c071q", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\uff0e\ud835\udfd7", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u10ad\ud8be\udccd\ua868\u05ae\u3002\u10be\u200c\u200c", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u2d0d\ud8be\udccd\ua868\u05ae\u3002\u2d1e\u200c\u200c", + "output": null + }, + { + "comment": "V6", + "input": "xn--5cb172r175fug38a.xn--mlj", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--5cb172r175fug38a.xn--0uga051h", + "output": null + }, + { + "comment": "V6", + "input": "xn--5cb347co96jug15a.xn--2nd", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--5cb347co96jug15a.xn--2nd059ea", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud800\udef0\u3002\udb05\udcf1", + "output": null + }, + { + "comment": "V6", + "input": "xn--k97c.xn--q031e", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u10ab\ud89b\udff8\uade4\uff0e\uda40\udd7c\ud835\udfe2\ud72a\u0ae3", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u10ab\ud89b\udff8\u1100\u1172\u11af\uff0e\uda40\udd7c\ud835\udfe2\u1112\u1171\u11b9\u0ae3", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u10ab\ud89b\udff8\uade4.\uda40\udd7c0\ud72a\u0ae3", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u10ab\ud89b\udff8\u1100\u1172\u11af.\uda40\udd7c0\u1112\u1171\u11b9\u0ae3", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u2d0b\ud89b\udff8\u1100\u1172\u11af.\uda40\udd7c0\u1112\u1171\u11b9\u0ae3", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u2d0b\ud89b\udff8\uade4.\uda40\udd7c0\ud72a\u0ae3", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--i0b436pkl2g2h42a.xn--0-8le8997mulr5f", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--i0b601b6r7l2hs0a.xn--0-8le8997mulr5f", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u2d0b\ud89b\udff8\u1100\u1172\u11af\uff0e\uda40\udd7c\ud835\udfe2\u1112\u1171\u11b9\u0ae3", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u08df\u2d0b\ud89b\udff8\uade4\uff0e\uda40\udd7c\ud835\udfe2\ud72a\u0ae3", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u0784\uff0e\ud83a\udc5d\u0601", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u0784.\ud83a\udc5d\u0601", + "output": null + }, + { + "comment": "V6", + "input": "xn--lqb.xn--jfb1808v", + "output": null + }, + { + "comment": "V5", + "input": "\u0acd\u2083.8\ua8c4\u200d\ud83c\udce4", + "output": null + }, + { + "comment": "V5", + "input": "\u0acd3.8\ua8c4\u200d\ud83c\udce4", + "output": null + }, + { + "comment": "V5", + "input": "xn--3-yke.xn--8-sl4et308f", + "output": null + }, + { + "comment": "V5", + "input": "xn--3-yke.xn--8-ugnv982dbkwm", + "output": null + }, + { + "comment": "C1", + "input": "\u9c4a\u3002\u200c", + "output": null + }, + { + "input": "xn--rt6a.", + "output": "xn--rt6a." + }, + { + "input": "\u9c4a.", + "output": "xn--rt6a." + }, + { + "comment": "C1", + "input": "xn--rt6a.xn--0ug", + "output": null + }, + { + "input": "xn--4-0bd15808a.", + "output": "xn--4-0bd15808a." + }, + { + "input": "\ud83a\udd3a\u07cc4.", + "output": "xn--4-0bd15808a." + }, + { + "input": "\ud83a\udd18\u07cc4.", + "output": "xn--4-0bd15808a." + }, + { + "comment": "V3 (ignored)", + "input": "-\uff61\u43db", + "output": "-.xn--xco" + }, + { + "comment": "V3 (ignored)", + "input": "-\u3002\u43db", + "output": "-.xn--xco" + }, + { + "comment": "V3 (ignored)", + "input": "-.xn--xco", + "output": "-.xn--xco" + }, + { + "comment": "C1; C2; P1; V6", + "input": "\u200c\ud908\udce0\uff0e\u200d", + "output": null + }, + { + "comment": "C1; C2; P1; V6", + "input": "\u200c\ud908\udce0.\u200d", + "output": null + }, + { + "comment": "V6", + "input": "xn--dj8y.", + "output": null + }, + { + "comment": "C1; C2; V6", + "input": "xn--0ugz7551c.xn--1ug", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud804\uddc0.\udb42\ude31", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--wd1d.xn--k946e", + "output": null + }, + { + "input": "\ud83a\udd2a.\u03c2", + "output": "xn--ie6h.xn--3xa" + }, + { + "input": "\ud83a\udd08.\u03a3", + "output": "xn--ie6h.xn--4xa" + }, + { + "input": "\ud83a\udd2a.\u03c3", + "output": "xn--ie6h.xn--4xa" + }, + { + "input": "\ud83a\udd08.\u03c3", + "output": "xn--ie6h.xn--4xa" + }, + { + "input": "xn--ie6h.xn--4xa", + "output": "xn--ie6h.xn--4xa" + }, + { + "input": "\ud83a\udd08.\u03c2", + "output": "xn--ie6h.xn--3xa" + }, + { + "input": "xn--ie6h.xn--3xa", + "output": "xn--ie6h.xn--3xa" + }, + { + "input": "\ud83a\udd2a.\u03a3", + "output": "xn--ie6h.xn--4xa" + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u10ba\uff61\u03c2", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u10ba\u3002\u03c2", + "output": null + }, + { + "comment": "C1", + "input": "\u200c\u2d1a\u3002\u03c2", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u10ba\u3002\u03a3", + "output": null + }, + { + "comment": "C1", + "input": "\u200c\u2d1a\u3002\u03c3", + "output": null + }, + { + "input": "xn--ilj.xn--4xa", + "output": "xn--ilj.xn--4xa" + }, + { + "input": "\u2d1a.\u03c3", + "output": "xn--ilj.xn--4xa" + }, + { + "comment": "P1; V6", + "input": "\u10ba.\u03a3", + "output": null + }, + { + "input": "\u2d1a.\u03c2", + "output": "xn--ilj.xn--3xa" + }, + { + "comment": "P1; V6", + "input": "\u10ba.\u03c2", + "output": null + }, + { + "comment": "V6", + "input": "xn--ynd.xn--4xa", + "output": null + }, + { + "comment": "V6", + "input": "xn--ynd.xn--3xa", + "output": null + }, + { + "input": "xn--ilj.xn--3xa", + "output": "xn--ilj.xn--3xa" + }, + { + "comment": "P1; V6", + "input": "\u10ba.\u03c3", + "output": null + }, + { + "comment": "C1", + "input": "xn--0ug262c.xn--4xa", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--ynd759e.xn--4xa", + "output": null + }, + { + "comment": "C1", + "input": "xn--0ug262c.xn--3xa", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--ynd759e.xn--3xa", + "output": null + }, + { + "comment": "C1", + "input": "\u200c\u2d1a\uff61\u03c2", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u10ba\uff61\u03a3", + "output": null + }, + { + "comment": "C1", + "input": "\u200c\u2d1a\uff61\u03c3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u2f95\u3002\u200c\u0310\ua953\ua84e", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u2f95\u3002\u200c\ua953\u0310\ua84e", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u8c37\u3002\u200c\ua953\u0310\ua84e", + "output": null + }, + { + "comment": "V5", + "input": "xn--6g3a.xn--0sa8175flwa", + "output": null + }, + { + "comment": "C1; C2", + "input": "xn--1ug0273b.xn--0sa359l6n7g13a", + "output": null + }, + { + "input": "\u6dfd\u3002\u183e", + "output": "xn--34w.xn--x7e" + }, + { + "input": "xn--34w.xn--x7e", + "output": "xn--34w.xn--x7e" + }, + { + "input": "\u6dfd.\u183e", + "output": "xn--34w.xn--x7e" + }, + { + "comment": "P1; V5; V6", + "input": "\uda72\ude29\u10b3\u2753\uff61\ud804\udd28", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\uda72\ude29\u10b3\u2753\u3002\ud804\udd28", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\uda72\ude29\u2d13\u2753\u3002\ud804\udd28", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--8di78qvw32y.xn--k80d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--rnd896i0j14q.xn--k80d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\uda72\ude29\u2d13\u2753\uff61\ud804\udd28", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u17ff\uff61\ud83a\udf33", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u17ff\u3002\ud83a\udf33", + "output": null + }, + { + "comment": "V6", + "input": "xn--45e.xn--et6h", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u0652\u200d\uff61\u0ccd\ud805\udeb3", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u0652\u200d\u3002\u0ccd\ud805\udeb3", + "output": null + }, + { + "comment": "V5", + "input": "xn--uhb.xn--8tc4527k", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--uhb882k.xn--8tc4527k", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u00df\ud880\udc3b\ud8da\udf17\uff61\ud836\ude68\ud83d\udd6e\u00df", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u00df\ud880\udc3b\ud8da\udf17\u3002\ud836\ude68\ud83d\udd6e\u00df", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "SS\ud880\udc3b\ud8da\udf17\u3002\ud836\ude68\ud83d\udd6eSS", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "ss\ud880\udc3b\ud8da\udf17\u3002\ud836\ude68\ud83d\udd6ess", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "Ss\ud880\udc3b\ud8da\udf17\u3002\ud836\ude68\ud83d\udd6eSs", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ss-jl59biy67d.xn--ss-4d11aw87d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--zca20040bgrkh.xn--zca3653v86qa", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "SS\ud880\udc3b\ud8da\udf17\uff61\ud836\ude68\ud83d\udd6eSS", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "ss\ud880\udc3b\ud8da\udf17\uff61\ud836\ude68\ud83d\udd6ess", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "Ss\ud880\udc3b\ud8da\udf17\uff61\ud836\ude68\ud83d\udd6eSs", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u3002\u200c", + "output": null + }, + { + "comment": "C1; C2", + "input": "xn--1ug.xn--0ug", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb41\udc58\uff0e\udb40\udd2e", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb41\udc58.\udb40\udd2e", + "output": null + }, + { + "comment": "V6", + "input": "xn--s136e.", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua9b7\udb37\udd59\uba79\u3002\u249b\udb42\ude07", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua9b7\udb37\udd59\u1106\u1167\u11b0\u3002\u249b\udb42\ude07", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua9b7\udb37\udd59\uba79\u300220.\udb42\ude07", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua9b7\udb37\udd59\u1106\u1167\u11b0\u300220.\udb42\ude07", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ym9av13acp85w.20.xn--d846e", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ym9av13acp85w.xn--dth22121k", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\uff61\ufe12", + "output": null + }, + { + "comment": "C1; A4_2 (ignored)", + "input": "\u200c\u3002\u3002", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": "..", + "output": ".." + }, + { + "comment": "C1; A4_2 (ignored)", + "input": "xn--0ug..", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--y86c", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug.xn--y86c", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-\ud835\udff9.\u00df-\u200c-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-3.\u00df-\u200c-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-3.SS-\u200c-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-3.ss-\u200c-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-3.Ss-\u200c-", + "output": null + }, + { + "comment": "V2 (ignored); V3 (ignored)", + "input": "xn---3-p9o.ss--", + "output": "xn---3-p9o.ss--" + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn---3-p9o.xn--ss---276a", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn---3-p9o.xn-----fia9303a", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-\ud835\udff9.SS-\u200c-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-\ud835\udff9.ss-\u200c-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u1872-\ud835\udff9.Ss-\u200c-", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\udb27\udd9c\u1898\u3002\u1a7f\u2ea2", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ibf35138o.xn--fpfz94g", + "output": null + }, + { + "comment": "P1; V6", + "input": "\uda1c\udda7\ud835\udfef\u3002\u2488\u1a76\ud835\udfda\uda41\ude0c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\uda1c\udda73\u30021.\u1a762\uda41\ude0c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--3-rj42h.1.xn--2-13k96240l", + "output": null + }, + { + "comment": "V6", + "input": "xn--3-rj42h.xn--2-13k746cq465x", + "output": null + }, + { + "input": "\ua860\uff0e\u06f2", + "output": "xn--5c9a.xn--fmb" + }, + { + "input": "\ua860.\u06f2", + "output": "xn--5c9a.xn--fmb" + }, + { + "input": "xn--5c9a.xn--fmb", + "output": "xn--5c9a.xn--fmb" + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ua67d\u200c\ud87e\uddf5\ud83c\udd06\uff61\u200c\ud804\udc42\u1b01", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ua67d\u200c\u9723\ud83c\udd06\uff61\u200c\ud804\udc42\u1b01", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--2q5a751a653w.xn--4sf0725i", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--0ug4208b2vjuk63a.xn--4sf36u6u4w", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u514e\uff61\u183c\udb43\udd1c\ud805\udeb6\ud807\udc3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u514e\u3002\u183c\udb43\udd1c\ud805\udeb6\ud807\udc3f", + "output": null + }, + { + "comment": "V6", + "input": "xn--b5q.xn--v7e6041kqqd4m251b", + "output": null + }, + { + "comment": "C2", + "input": "\ud835\udfd9\uff61\u200d\ud835\udff8\u200d\u2077", + "output": null + }, + { + "comment": "C2", + "input": "1\u3002\u200d2\u200d7", + "output": null + }, + { + "comment": "C2", + "input": "1.xn--27-l1tb", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\u1868-\uff61\udb43\udecb\ud835\udff7", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\u1868-\u3002\udb43\udecb1", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----z8j.xn--1-5671m", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u10bc\ud9e3\udded\u0f80\u2f87\u3002\u10af\u2640\u200c\u200c", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u10bc\ud9e3\udded\u0f80\u821b\u3002\u10af\u2640\u200c\u200c", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u2d1c\ud9e3\udded\u0f80\u821b\u3002\u2d0f\u2640\u200c\u200c", + "output": null + }, + { + "comment": "V6", + "input": "xn--zed372mdj2do3v4h.xn--e5h11w", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--zed372mdj2do3v4h.xn--0uga678bgyh", + "output": null + }, + { + "comment": "V6", + "input": "xn--zed54dz10wo343g.xn--nnd651i", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--zed54dz10wo343g.xn--nnd089ea464d", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u2d1c\ud9e3\udded\u0f80\u2f87\u3002\u2d0f\u2640\u200c\u200c", + "output": null + }, + { + "comment": "C2; V5", + "input": "\ud804\udc46\ud835\udff0.\u200d", + "output": null + }, + { + "comment": "C2; V5", + "input": "\ud804\udc464.\u200d", + "output": null + }, + { + "comment": "V5", + "input": "xn--4-xu7i.", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--4-xu7i.xn--1ug", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u10be\u7640\uff61\ud805\ude3f\u200d\u200c\ubdbc", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u10be\u7640\uff61\ud805\ude3f\u200d\u200c\u1107\u1170\u11ab", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u10be\u7640\u3002\ud805\ude3f\u200d\u200c\ubdbc", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u10be\u7640\u3002\ud805\ude3f\u200d\u200c\u1107\u1170\u11ab", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u2d1e\u7640\u3002\ud805\ude3f\u200d\u200c\u1107\u1170\u11ab", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u2d1e\u7640\u3002\ud805\ude3f\u200d\u200c\ubdbc", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--mlju35u7qx2f.xn--et3bn23n", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--mlju35u7qx2f.xn--0ugb6122js83c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--2nd6803c7q37d.xn--et3bn23n", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--2nd6803c7q37d.xn--0ugb6122js83c", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u2d1e\u7640\uff61\ud805\ude3f\u200d\u200c\u1107\u1170\u11ab", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud97b\udd18\u2d1e\u7640\uff61\ud805\ude3f\u200d\u200c\ubdbc", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "-\ud804\ude36\u248f\uff0e\u248e\ud881\udee2\udb40\udfad", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored); A4_2 (ignored)", + "input": "-\ud804\ude368..7.\ud881\udee2\udb40\udfad", + "output": null + }, + { + "comment": "V6; V3 (ignored); A4_2 (ignored)", + "input": "xn---8-bv5o..7.xn--c35nf1622b", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----scp6252h.xn--zshy411yzpx2d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u0ecb\u200d\uff0e\u9381\udb43\udc11", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u0ecb\u200d.\u9381\udb43\udc11", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--t8c.xn--iz4a43209d", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--t8c059f.xn--iz4a43209d", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud9e5\udef4.-\u1862\u0592\ud836\ude20", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn--ep37b.xn----hec165lho83b", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b\uff0e\u1baa\u03c2\u10a6\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b.\u1baa\u03c2\u10a6\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b.\u1baa\u03c2\u2d06\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b.\u1baa\u03a3\u10a6\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b.\u1baa\u03c3\u2d06\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b.\u1baa\u03a3\u2d06\u200d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--nu4s.xn--4xa153j7im", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--nu4s.xn--4xa153jk8cs1q", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--nu4s.xn--4xa217dxri", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--nu4s.xn--4xa217dxriome", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--nu4s.xn--3xa353jk8cs1q", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--nu4s.xn--3xa417dxriome", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b\uff0e\u1baa\u03c2\u2d06\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b\uff0e\u1baa\u03a3\u10a6\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b\uff0e\u1baa\u03c3\u2d06\u200d", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ud8bc\udc2b\uff0e\u1baa\u03a3\u2d06\u200d", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\u2488\u200c\uaaec\ufe12\uff0e\u0acd", + "output": null + }, + { + "comment": "C1; V5; A4_2 (ignored)", + "input": "1.\u200c\uaaec\u3002.\u0acd", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "1.xn--sv9a..xn--mfc", + "output": null + }, + { + "comment": "C1; V5; A4_2 (ignored)", + "input": "1.xn--0ug7185c..xn--mfc", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--tsh0720cse8b.xn--mfc", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--0ug78o720myr1c.xn--mfc", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u00df\u200d.\u1bf2\ud8d3\udfbc", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "SS\u200d.\u1bf2\ud8d3\udfbc", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "ss\u200d.\u1bf2\ud8d3\udfbc", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "Ss\u200d.\u1bf2\ud8d3\udfbc", + "output": null + }, + { + "comment": "V5; V6", + "input": "ss.xn--0zf22107b", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--ss-n1t.xn--0zf22107b", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn--zca870n.xn--0zf22107b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83d\udd7c\uff0e\uffa0", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud83d\udd7c.\u1160", + "output": null + }, + { + "comment": "V6", + "input": "xn--my8h.xn--psd", + "output": null + }, + { + "comment": "V6", + "input": "xn--my8h.xn--cl7c", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u7215\uda8d\ude51\uff0e\ud835\udff0\u6c17", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u7215\uda8d\ude51.4\u6c17", + "output": null + }, + { + "comment": "V6", + "input": "xn--1zxq3199c.xn--4-678b", + "output": null + }, + { + "comment": "P1; V6; V2 (ignored); V3 (ignored)", + "input": "\udb39\udf43\u3002\uda04\udd83\ud8e6\udc97--", + "output": null + }, + { + "comment": "V6; V2 (ignored); V3 (ignored)", + "input": "xn--2y75e.xn-----1l15eer88n", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u8530\u3002\udb40\udc79\u08dd-\ud804\ude35", + "output": null + }, + { + "comment": "V6", + "input": "xn--sz1a.xn----mrd9984r3dl0i", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c2\u10c5\u3002\u075a", + "output": null + }, + { + "input": "\u03c2\u2d25\u3002\u075a", + "output": "xn--3xa403s.xn--epb" + }, + { + "comment": "P1; V6", + "input": "\u03a3\u10c5\u3002\u075a", + "output": null + }, + { + "input": "\u03c3\u2d25\u3002\u075a", + "output": "xn--4xa203s.xn--epb" + }, + { + "input": "\u03a3\u2d25\u3002\u075a", + "output": "xn--4xa203s.xn--epb" + }, + { + "input": "xn--4xa203s.xn--epb", + "output": "xn--4xa203s.xn--epb" + }, + { + "input": "\u03c3\u2d25.\u075a", + "output": "xn--4xa203s.xn--epb" + }, + { + "comment": "P1; V6", + "input": "\u03a3\u10c5.\u075a", + "output": null + }, + { + "input": "\u03a3\u2d25.\u075a", + "output": "xn--4xa203s.xn--epb" + }, + { + "comment": "V6", + "input": "xn--4xa477d.xn--epb", + "output": null + }, + { + "input": "xn--3xa403s.xn--epb", + "output": "xn--3xa403s.xn--epb" + }, + { + "input": "\u03c2\u2d25.\u075a", + "output": "xn--3xa403s.xn--epb" + }, + { + "comment": "V6", + "input": "xn--3xa677d.xn--epb", + "output": null + }, + { + "input": "xn--vkb.xn--08e172a", + "output": "xn--vkb.xn--08e172a" + }, + { + "input": "\u06bc.\u1e8f\u1864", + "output": "xn--vkb.xn--08e172a" + }, + { + "input": "\u06bc.y\u0307\u1864", + "output": "xn--vkb.xn--08e172a" + }, + { + "input": "\u06bc.Y\u0307\u1864", + "output": "xn--vkb.xn--08e172a" + }, + { + "input": "\u06bc.\u1e8e\u1864", + "output": "xn--vkb.xn--08e172a" + }, + { + "comment": "V6", + "input": "xn--pt9c.xn--hnd666l", + "output": null + }, + { + "input": "xn--pt9c.xn--0kjya", + "output": "xn--pt9c.xn--0kjya" + }, + { + "input": "\ud802\ude57.\u2d09\u2d15", + "output": "xn--pt9c.xn--0kjya" + }, + { + "comment": "P1; V6", + "input": "\ud802\ude57.\u10a9\u10b5", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud802\ude57.\u10a9\u2d15", + "output": null + }, + { + "comment": "V6", + "input": "xn--pt9c.xn--hndy", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\u200c\u200c\u3124\uff0e\u032e\udb16\ude11\u09c2", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\u200c\u200c\u3124.\u032e\udb16\ude11\u09c2", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--1fk.xn--vta284a9o563a", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--0uga242k.xn--vta284a9o563a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10b4\ud836\ude28\u2083\udb40\udc66\uff0e\ud835\udff3\ud804\udcb9\u0b82", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10b4\ud836\ude283\udb40\udc66.7\ud804\udcb9\u0b82", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d14\ud836\ude283\udb40\udc66.7\ud804\udcb9\u0b82", + "output": null + }, + { + "comment": "V6", + "input": "xn--3-ews6985n35s3g.xn--7-cve6271r", + "output": null + }, + { + "comment": "V6", + "input": "xn--3-b1g83426a35t0g.xn--7-cve6271r", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d14\ud836\ude28\u2083\udb40\udc66\uff0e\ud835\udff3\ud804\udcb9\u0b82", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u43c8\u200c\u3002\u200c\u2488\ud986\udc95", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u43c8\u200c\u3002\u200c1.\ud986\udc95", + "output": null + }, + { + "comment": "V6", + "input": "xn--eco.1.xn--ms39a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug491l.xn--1-rgn.xn--ms39a", + "output": null + }, + { + "comment": "V6", + "input": "xn--eco.xn--tsh21126d", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug491l.xn--0ug88oot66q", + "output": null + }, + { + "comment": "V5", + "input": "\uff11\uaaf6\u00df\ud807\udca5\uff61\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "1\uaaf6\u00df\ud807\udca5\u3002\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "1\uaaf6SS\ud807\udca5\u3002\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "1\uaaf6ss\ud807\udca5\u3002\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "xn--1ss-ir6ln166b.xn--weg", + "output": null + }, + { + "comment": "V5", + "input": "xn--1-qfa2471kdb0d.xn--weg", + "output": null + }, + { + "comment": "V5", + "input": "\uff11\uaaf6SS\ud807\udca5\uff61\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "\uff11\uaaf6ss\ud807\udca5\uff61\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "1\uaaf6Ss\ud807\udca5\u3002\u1dd8", + "output": null + }, + { + "comment": "V5", + "input": "\uff11\uaaf6Ss\ud807\udca5\uff61\u1dd8", + "output": null + }, + { + "comment": "V6", + "input": "xn--3j78f.xn--mkb20b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud88a\udd31\u249b\u2fb3\uff0e\ua866\u2488", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud88a\udd3120.\u97f3.\ua8661.", + "output": null + }, + { + "comment": "V6", + "input": "xn--20-9802c.xn--0w5a.xn--1-eg4e.", + "output": null + }, + { + "comment": "V6", + "input": "xn--dth6033bzbvx.xn--tsh9439b", + "output": null + }, + { + "input": "xn--ge6h.xn--oc9a", + "output": "xn--ge6h.xn--oc9a" + }, + { + "input": "\ud83a\udd28.\ua84f", + "output": "xn--ge6h.xn--oc9a" + }, + { + "input": "\ud83a\udd06.\ua84f", + "output": "xn--ge6h.xn--oc9a" + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\u200c.\u00df\u10a9-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u200c.\u00df\u2d09-", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\u200c.SS\u10a9-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u200c.ss\u2d09-", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "\u200c.Ss\u2d09-", + "output": null + }, + { + "comment": "V3 (ignored); A4_2 (ignored)", + "input": ".xn--ss--bi1b", + "output": ".xn--ss--bi1b" + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn--0ug.xn--ss--bi1b", + "output": null + }, + { + "comment": "V6; V3 (ignored); A4_2 (ignored)", + "input": ".xn--ss--4rn", + "output": null + }, + { + "comment": "C1; V6; V3 (ignored)", + "input": "xn--0ug.xn--ss--4rn", + "output": null + }, + { + "comment": "C1; V3 (ignored)", + "input": "xn--0ug.xn----pfa2305a", + "output": null + }, + { + "comment": "C1; V6; V3 (ignored)", + "input": "xn--0ug.xn----pfa042j", + "output": null + }, + { + "input": "\u9f59--\ud835\udff0.\u00df", + "output": "xn----4-p16k.xn--zca" + }, + { + "input": "\u9f59--4.\u00df", + "output": "xn----4-p16k.xn--zca" + }, + { + "input": "\u9f59--4.SS", + "output": "xn----4-p16k.ss" + }, + { + "input": "\u9f59--4.ss", + "output": "xn----4-p16k.ss" + }, + { + "input": "\u9f59--4.Ss", + "output": "xn----4-p16k.ss" + }, + { + "input": "xn----4-p16k.ss", + "output": "xn----4-p16k.ss" + }, + { + "input": "xn----4-p16k.xn--zca", + "output": "xn----4-p16k.xn--zca" + }, + { + "input": "\u9f59--\ud835\udff0.SS", + "output": "xn----4-p16k.ss" + }, + { + "input": "\u9f59--\ud835\udff0.ss", + "output": "xn----4-p16k.ss" + }, + { + "input": "\u9f59--\ud835\udff0.Ss", + "output": "xn----4-p16k.ss" + }, + { + "comment": "C2; P1; V6", + "input": "\udacf\udc99\udb40\uded8\uff61?-\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\udacf\udc99\udb40\uded8\u3002?-\u200d", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "xn--ct86d8w51a.?-", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "xn--ct86d8w51a.xn--?--n1t", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "xn--ct86d8w51a.?-\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "XN--CT86D8W51A.?-\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "Xn--Ct86d8w51a.?-\u200d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud836\ude9e\u10b0\uff61\ucaa1", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud836\ude9e\u10b0\uff61\u110d\u1168\u11a8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud836\ude9e\u10b0\u3002\ucaa1", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud836\ude9e\u10b0\u3002\u110d\u1168\u11a8", + "output": null + }, + { + "comment": "V5", + "input": "\ud836\ude9e\u2d10\u3002\u110d\u1168\u11a8", + "output": null + }, + { + "comment": "V5", + "input": "\ud836\ude9e\u2d10\u3002\ucaa1", + "output": null + }, + { + "comment": "V5", + "input": "xn--7kj1858k.xn--pi6b", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ond3755u.xn--pi6b", + "output": null + }, + { + "comment": "V5", + "input": "\ud836\ude9e\u2d10\uff61\u110d\u1168\u11a8", + "output": null + }, + { + "comment": "V5", + "input": "\ud836\ude9e\u2d10\uff61\ucaa1", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u1845\uff10\u200c\uff61\u23a2\udb52\ude04", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u18450\u200c\u3002\u23a2\udb52\ude04", + "output": null + }, + { + "comment": "V6", + "input": "xn--0-z6j.xn--8lh28773l", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0-z6jy93b.xn--8lh28773l", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200d\u00df", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a9\ua369\u17d3.\u200d\u00df", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a9\ua369\u17d3.\u200dSS", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a9\ua369\u17d3.\u200dss", + "output": null + }, + { + "comment": "V6", + "input": "xn--9-i0j5967eg3qz.ss", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--9-i0j5967eg3qz.xn--ss-l1t", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--9-i0j5967eg3qz.xn--zca770n", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200dSS", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200dss", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a9\ua369\u17d3.\u200dSs", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\ud88a\udf9a\uff19\ua369\u17d3\uff0e\u200dSs", + "output": null + }, + { + "input": "\ua5f7\ud804\udd80.\u075d\ud802\ude52", + "output": "xn--ju8a625r.xn--hpb0073k" + }, + { + "input": "xn--ju8a625r.xn--hpb0073k", + "output": "xn--ju8a625r.xn--hpb0073k" + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u10af\udb40\udd4b-\uff0e\u200d\u10a9", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "\u10af\udb40\udd4b-.\u200d\u10a9", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "\u2d0f\udb40\udd4b-.\u200d\u2d09", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "xn----3vs.xn--0kj", + "output": "xn----3vs.xn--0kj" + }, + { + "comment": "C2; V3 (ignored)", + "input": "xn----3vs.xn--1ug532c", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----00g.xn--hnd", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----00g.xn--hnd399e", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "\u2d0f\udb40\udd4b-\uff0e\u200d\u2d09", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u1714\u3002\udb40\udda3-\ud804\udeea", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--fze.xn----ly8i", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-\uff0e\uda60\udfdc\u05bd\u00df", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-.\uda60\udfdc\u05bd\u00df", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-.\uda60\udfdc\u05bdSS", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-.\uda60\udfdc\u05bdss", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-.\uda60\udfdc\u05bdSs", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----pw5e.xn--ss-7jd10716y", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----pw5e.xn--zca50wfv060a", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-\uff0e\uda60\udfdc\u05bdSS", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-\uff0e\uda60\udfdc\u05bdss", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\uabe8-\uff0e\uda60\udfdc\u05bdSs", + "output": null + }, + { + "comment": "V5", + "input": "\ud835\udfe5\u266e\ud805\udf2b\u08ed\uff0e\u17d2\ud805\udf2b8\udb40\udd8f", + "output": null + }, + { + "comment": "V5", + "input": "3\u266e\ud805\udf2b\u08ed.\u17d2\ud805\udf2b8\udb40\udd8f", + "output": null + }, + { + "comment": "V5", + "input": "xn--3-ksd277tlo7s.xn--8-f0jx021l", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "-\uff61\uda14\udf00\u200d\u2761", + "output": null + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "-\u3002\uda14\udf00\u200d\u2761", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "-.xn--nei54421f", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "-.xn--1ug800aq795s", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ud835\udfd3\u2631\ud835\udfd0\uda57\udc35\uff61\ud836\udeae\ud902\udc73", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "5\u26312\uda57\udc35\u3002\ud836\udeae\ud902\udc73", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--52-dwx47758j.xn--kd3hk431k", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "-.-\u251c\uda1a\udda3", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "-.xn----ukp70432h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c2\uff0e\ufdc1\ud83d\udf9b\u2488", + "output": null + }, + { + "input": "\u03c2.\u0641\u0645\u064a\ud83d\udf9b1.", + "output": "xn--3xa.xn--1-gocmu97674d." + }, + { + "input": "\u03a3.\u0641\u0645\u064a\ud83d\udf9b1.", + "output": "xn--4xa.xn--1-gocmu97674d." + }, + { + "input": "\u03c3.\u0641\u0645\u064a\ud83d\udf9b1.", + "output": "xn--4xa.xn--1-gocmu97674d." + }, + { + "input": "xn--4xa.xn--1-gocmu97674d.", + "output": "xn--4xa.xn--1-gocmu97674d." + }, + { + "input": "xn--3xa.xn--1-gocmu97674d.", + "output": "xn--3xa.xn--1-gocmu97674d." + }, + { + "comment": "P1; V6", + "input": "\u03a3\uff0e\ufdc1\ud83d\udf9b\u2488", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u03c3\uff0e\ufdc1\ud83d\udf9b\u2488", + "output": null + }, + { + "comment": "V6", + "input": "xn--4xa.xn--dhbip2802atb20c", + "output": null + }, + { + "comment": "V6", + "input": "xn--3xa.xn--dhbip2802atb20c", + "output": null + }, + { + "comment": "P1; V6", + "input": "9\udb40\udde5\uff0e\udb6b\udd34\u1893", + "output": null + }, + { + "comment": "P1; V6", + "input": "9\udb40\udde5.\udb6b\udd34\u1893", + "output": null + }, + { + "comment": "V6", + "input": "9.xn--dbf91222q", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ufe12\u10b6\u0366\uff0e\u200c", + "output": null + }, + { + "comment": "C1; P1; V6; A4_2 (ignored)", + "input": "\u3002\u10b6\u0366.\u200c", + "output": null + }, + { + "comment": "C1; A4_2 (ignored)", + "input": "\u3002\u2d16\u0366.\u200c", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": ".xn--hva754s.", + "output": ".xn--hva754s." + }, + { + "comment": "C1; A4_2 (ignored)", + "input": ".xn--hva754s.xn--0ug", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--hva929d.", + "output": null + }, + { + "comment": "C1; V6; A4_2 (ignored)", + "input": ".xn--hva929d.xn--0ug", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ufe12\u2d16\u0366\uff0e\u200c", + "output": null + }, + { + "comment": "V6", + "input": "xn--hva754sy94k.", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--hva754sy94k.xn--0ug", + "output": null + }, + { + "comment": "V6", + "input": "xn--hva929dl29p.", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--hva929dl29p.xn--0ug", + "output": null + }, + { + "input": "xn--hva754s.", + "output": "xn--hva754s." + }, + { + "input": "\u2d16\u0366.", + "output": "xn--hva754s." + }, + { + "comment": "P1; V6", + "input": "\u10b6\u0366.", + "output": null + }, + { + "comment": "V6", + "input": "xn--hva929d.", + "output": null + }, + { + "input": "xn--hzb.xn--ukj4430l", + "output": "xn--hzb.xn--ukj4430l" + }, + { + "input": "\u08bb.\u2d03\ud838\udc12", + "output": "xn--hzb.xn--ukj4430l" + }, + { + "comment": "P1; V6", + "input": "\u08bb.\u10a3\ud838\udc12", + "output": null + }, + { + "comment": "V6", + "input": "xn--hzb.xn--bnd2938u", + "output": null + }, + { + "comment": "C1; C2; P1; V6", + "input": "\u200d\u200c\u3002\uff12\u4af7\udb42\uddf7", + "output": null + }, + { + "comment": "C1; C2; P1; V6", + "input": "\u200d\u200c\u30022\u4af7\udb42\uddf7", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--2-me5ay1273i", + "output": null + }, + { + "comment": "C1; C2; V6", + "input": "xn--0ugb.xn--2-me5ay1273i", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "-\ud838\udc24\udb32\udc10\u3002\ud9e2\udf16", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----rq4re4997d.xn--l707b", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\udb8d\udec2\ufe12\u200c\u37c0\uff0e\u0624\u2488", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\udb8d\udec2\ufe12\u200c\u37c0\uff0e\u0648\u0654\u2488", + "output": null + }, + { + "comment": "V6", + "input": "xn--z272f.xn--etl.xn--1-smc.", + "output": null + }, + { + "comment": "V6", + "input": "xn--etlt457ccrq7h.xn--jgb476m", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug754gxl4ldlt0k.xn--jgb476m", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u07fc\ud803\ude06.\ud80d\udd8f\ufe12\ud8ea\ude29\u10b0", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u07fc\ud803\ude06.\ud80d\udd8f\u3002\ud8ea\ude29\u10b0", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u07fc\ud803\ude06.\ud80d\udd8f\u3002\ud8ea\ude29\u2d10", + "output": null + }, + { + "comment": "V6", + "input": "xn--0tb8725k.xn--tu8d.xn--7kj73887a", + "output": null + }, + { + "comment": "V6", + "input": "xn--0tb8725k.xn--tu8d.xn--ond97931d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u07fc\ud803\ude06.\ud80d\udd8f\ufe12\ud8ea\ude29\u2d10", + "output": null + }, + { + "comment": "V6", + "input": "xn--0tb8725k.xn--7kj9008dt18a7py9c", + "output": null + }, + { + "comment": "V6", + "input": "xn--0tb8725k.xn--ond3562jt18a7py9c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u10c5\u26ad\udb41\uddab\u22c3\uff61\ud804\udf3c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u10c5\u26ad\udb41\uddab\u22c3\u3002\ud804\udf3c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u2d25\u26ad\udb41\uddab\u22c3\u3002\ud804\udf3c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--vfh16m67gx1162b.xn--ro1d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--9nd623g4zc5z060c.xn--ro1d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u2d25\u26ad\udb41\uddab\u22c3\uff61\ud804\udf3c", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "\udb40\udd93\u26cf-\u3002\ua852", + "output": "xn----o9p.xn--rc9a" + }, + { + "comment": "V3 (ignored)", + "input": "xn----o9p.xn--rc9a", + "output": "xn----o9p.xn--rc9a" + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u650c\uabed\u3002\u1896-\u10b8", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u650c\uabed\u3002\u1896-\u2d18", + "output": null + }, + { + "input": "xn--p9ut19m.xn----mck373i", + "output": "xn--p9ut19m.xn----mck373i" + }, + { + "input": "\u650c\uabed.\u1896-\u2d18", + "output": "xn--p9ut19m.xn----mck373i" + }, + { + "comment": "P1; V6", + "input": "\u650c\uabed.\u1896-\u10b8", + "output": null + }, + { + "comment": "V6", + "input": "xn--p9ut19m.xn----k1g451d", + "output": null + }, + { + "comment": "C2", + "input": "xn--1ug592ykp6b.xn----mck373i", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug592ykp6b.xn----k1g451d", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\ua5a8\uff0e\u2497\uff13\ud212\u06f3", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\ua5a8\uff0e\u2497\uff13\u1110\u116d\u11a9\u06f3", + "output": null + }, + { + "comment": "C1", + "input": "\u200c\ua5a8.16.3\ud212\u06f3", + "output": null + }, + { + "comment": "C1", + "input": "\u200c\ua5a8.16.3\u1110\u116d\u11a9\u06f3", + "output": null + }, + { + "input": "xn--9r8a.16.xn--3-nyc0117m", + "output": "xn--9r8a.16.xn--3-nyc0117m" + }, + { + "input": "\ua5a8.16.3\ud212\u06f3", + "output": "xn--9r8a.16.xn--3-nyc0117m" + }, + { + "input": "\ua5a8.16.3\u1110\u116d\u11a9\u06f3", + "output": "xn--9r8a.16.xn--3-nyc0117m" + }, + { + "comment": "C1", + "input": "xn--0ug2473c.16.xn--3-nyc0117m", + "output": null + }, + { + "comment": "V6", + "input": "xn--9r8a.xn--3-nyc678tu07m", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug2473c.xn--3-nyc678tu07m", + "output": null + }, + { + "comment": "C2", + "input": "\ud835\udfcf\ud836\ude19\u2e16.\u200d", + "output": null + }, + { + "comment": "C2", + "input": "1\ud836\ude19\u2e16.\u200d", + "output": null + }, + { + "input": "xn--1-5bt6845n.", + "output": "xn--1-5bt6845n." + }, + { + "input": "1\ud836\ude19\u2e16.", + "output": "xn--1-5bt6845n." + }, + { + "comment": "C2", + "input": "xn--1-5bt6845n.xn--1ug", + "output": null + }, + { + "comment": "P1; V6", + "input": "F\udb40\udd5f\uff61\ud9fd\uddc5\u265a", + "output": null + }, + { + "comment": "P1; V6", + "input": "F\udb40\udd5f\u3002\ud9fd\uddc5\u265a", + "output": null + }, + { + "comment": "P1; V6", + "input": "f\udb40\udd5f\u3002\ud9fd\uddc5\u265a", + "output": null + }, + { + "comment": "V6", + "input": "f.xn--45hz6953f", + "output": null + }, + { + "comment": "P1; V6", + "input": "f\udb40\udd5f\uff61\ud9fd\uddc5\u265a", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0b4d\ud804\udd34\u1de9\u3002\ud835\udfee\u10b8\ud838\udc28\ud8ce\udd47", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0b4d\ud804\udd34\u1de9\u30022\u10b8\ud838\udc28\ud8ce\udd47", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0b4d\ud804\udd34\u1de9\u30022\u2d18\ud838\udc28\ud8ce\udd47", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--9ic246gs21p.xn--2-nws2918ndrjr", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--9ic246gs21p.xn--2-k1g43076adrwq", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u0b4d\ud804\udd34\u1de9\u3002\ud835\udfee\u2d18\ud838\udc28\ud8ce\udd47", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\uda0e\udc2d\u200c\u200c\u2488\u3002\u52c9\ud804\udc45", + "output": null + }, + { + "comment": "C1; P1; V6; A4_2 (ignored)", + "input": "\uda0e\udc2d\u200c\u200c1.\u3002\u52c9\ud804\udc45", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": "xn--1-yi00h..xn--4grs325b", + "output": null + }, + { + "comment": "C1; V6; A4_2 (ignored)", + "input": "xn--1-rgna61159u..xn--4grs325b", + "output": null + }, + { + "comment": "V6", + "input": "xn--tsh11906f.xn--4grs325b", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0uga855aez302a.xn--4grs325b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1843.\u73bf\ud96c\ude1c\udb15\udf90", + "output": null + }, + { + "comment": "V6", + "input": "xn--27e.xn--7cy81125a0yq4a", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u20da\uff0e\ud805\ude3f-", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u20da.\ud805\ude3f-", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--w0g.xn----bd0j", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u1082-\u200d\ua8ea\uff0e\ua84a\u200d\ud9b3\ude33", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\u1082-\u200d\ua8ea.\ua84a\u200d\ud9b3\ude33", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn----gyg3618i.xn--jc9ao4185a", + "output": null + }, + { + "comment": "C2; V5; V6", + "input": "xn----gyg250jio7k.xn--1ug8774cri56d", + "output": null + }, + { + "comment": "V5", + "input": "\ud804\ude35\u5eca.\ud802\udc0d", + "output": null + }, + { + "comment": "V5", + "input": "xn--xytw701b.xn--yc9c", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10be\ud899\udec0\ud82d\uddfb\uff0e\u1897\ub9ab", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10be\ud899\udec0\ud82d\uddfb\uff0e\u1897\u1105\u1174\u11c2", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10be\ud899\udec0\ud82d\uddfb.\u1897\ub9ab", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10be\ud899\udec0\ud82d\uddfb.\u1897\u1105\u1174\u11c2", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d1e\ud899\udec0\ud82d\uddfb.\u1897\u1105\u1174\u11c2", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d1e\ud899\udec0\ud82d\uddfb.\u1897\ub9ab", + "output": null + }, + { + "comment": "V6", + "input": "xn--mlj0486jgl2j.xn--hbf6853f", + "output": null + }, + { + "comment": "V6", + "input": "xn--2nd8876sgl2j.xn--hbf6853f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d1e\ud899\udec0\ud82d\uddfb\uff0e\u1897\u1105\u1174\u11c2", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d1e\ud899\udec0\ud82d\uddfb\uff0e\u1897\ub9ab", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u00df\u200d\u103a\uff61\u2488", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "SS\u200d\u103a\uff61\u2488", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "ss\u200d\u103a\uff61\u2488", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "Ss\u200d\u103a\uff61\u2488", + "output": null + }, + { + "comment": "V6", + "input": "xn--ss-f4j.xn--tsh", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--ss-f4j585j.xn--tsh", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--zca679eh2l.xn--tsh", + "output": null + }, + { + "input": "\u06cc\ud802\ude3f\uff0e\u00df\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--zca216edt0r" + }, + { + "input": "\u06cc\ud802\ude3f.\u00df\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--zca216edt0r" + }, + { + "input": "\u06cc\ud802\ude3f.SS\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "input": "\u06cc\ud802\ude3f.ss\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "input": "xn--clb2593k.xn--ss-toj6092t", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "input": "xn--clb2593k.xn--zca216edt0r", + "output": "xn--clb2593k.xn--zca216edt0r" + }, + { + "input": "\u06cc\ud802\ude3f\uff0eSS\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "input": "\u06cc\ud802\ude3f\uff0ess\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "input": "\u06cc\ud802\ude3f.Ss\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "input": "\u06cc\ud802\ude3f\uff0eSs\u0f84\ud804\udf6c", + "output": "xn--clb2593k.xn--ss-toj6092t" + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u0f9f\uff0e-\u082a", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u0f9f.-\u082a", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--vfd.xn----fhd", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1d6c\udb40\udda0\uff0e\ud552\u2492\u2488\udbe0\udd26", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1d6c\udb40\udda0\uff0e\u1111\u1175\u11bd\u2492\u2488\udbe0\udd26", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1d6c\udb40\udda0.\ud55211.1.\udbe0\udd26", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1d6c\udb40\udda0.\u1111\u1175\u11bd11.1.\udbe0\udd26", + "output": null + }, + { + "comment": "V6", + "input": "xn--tbg.xn--11-5o7k.1.xn--k469f", + "output": null + }, + { + "comment": "V6", + "input": "xn--tbg.xn--tsht7586kyts9l", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2488\u270c\uda3e\udf1f\uff0e\ud835\udfe1\ud943\udc63", + "output": null + }, + { + "comment": "P1; V6", + "input": "1.\u270c\uda3e\udf1f.9\ud943\udc63", + "output": null + }, + { + "comment": "V6", + "input": "1.xn--7bi44996f.xn--9-o706d", + "output": null + }, + { + "comment": "V6", + "input": "xn--tsh24g49550b.xn--9-o706d", + "output": null + }, + { + "comment": "V5", + "input": "\u03c2\uff0e\ua9c0\ua8c4", + "output": null + }, + { + "comment": "V5", + "input": "\u03c2.\ua9c0\ua8c4", + "output": null + }, + { + "comment": "V5", + "input": "\u03a3.\ua9c0\ua8c4", + "output": null + }, + { + "comment": "V5", + "input": "\u03c3.\ua9c0\ua8c4", + "output": null + }, + { + "comment": "V5", + "input": "xn--4xa.xn--0f9ars", + "output": null + }, + { + "comment": "V5", + "input": "xn--3xa.xn--0f9ars", + "output": null + }, + { + "comment": "V5", + "input": "\u03a3\uff0e\ua9c0\ua8c4", + "output": null + }, + { + "comment": "V5", + "input": "\u03c3\uff0e\ua9c0\ua8c4", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2786\ud99e\uddd5\u1ed7\u2488\uff0e\uda06\udf12\ud945\ude2e\u085b\ud835\udfeb", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2786\ud99e\uddd5o\u0302\u0303\u2488\uff0e\uda06\udf12\ud945\ude2e\u085b\ud835\udfeb", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u2786\ud99e\uddd5\u1ed71..\uda06\udf12\ud945\ude2e\u085b9", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u2786\ud99e\uddd5o\u0302\u03031..\uda06\udf12\ud945\ude2e\u085b9", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u2786\ud99e\uddd5O\u0302\u03031..\uda06\udf12\ud945\ude2e\u085b9", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u2786\ud99e\uddd5\u1ed61..\uda06\udf12\ud945\ude2e\u085b9", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": "xn--1-3xm292b6044r..xn--9-6jd87310jtcqs", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2786\ud99e\uddd5O\u0302\u0303\u2488\uff0e\uda06\udf12\ud945\ude2e\u085b\ud835\udfeb", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2786\ud99e\uddd5\u1ed6\u2488\uff0e\uda06\udf12\ud945\ude2e\u085b\ud835\udfeb", + "output": null + }, + { + "comment": "V6", + "input": "xn--6lg26tvvc6v99z.xn--9-6jd87310jtcqs", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": ".xn--ye6h", + "output": ".xn--ye6h" + }, + { + "input": "xn--ye6h", + "output": "xn--ye6h" + }, + { + "input": "\ud83a\udd3a", + "output": "xn--ye6h" + }, + { + "input": "\ud83a\udd18", + "output": "xn--ye6h" + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "\u073c\u200c-\u3002\ud80d\udc3e\u00df", + "output": null + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "\u073c\u200c-\u3002\ud80d\udc3eSS", + "output": null + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "\u073c\u200c-\u3002\ud80d\udc3ess", + "output": null + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "\u073c\u200c-\u3002\ud80d\udc3eSs", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----s2c.xn--ss-066q", + "output": null + }, + { + "comment": "C1; V5; V6; V3 (ignored)", + "input": "xn----s2c071q.xn--ss-066q", + "output": null + }, + { + "comment": "C1; V5; V6; V3 (ignored)", + "input": "xn----s2c071q.xn--zca7848m", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "-\uda9d\udf6c\u135e\ud805\udf27.\u1deb-\ufe12", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "-\uda9d\udf6c\u135e\ud805\udf27.\u1deb-\u3002", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----b5h1837n2ok9f.xn----mkm.", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----b5h1837n2ok9f.xn----mkmw278h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ufe12.\uda2a\udc21\u1a59", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u3002.\uda2a\udc21\u1a59", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": "..xn--cof61594i", + "output": null + }, + { + "comment": "V6", + "input": "xn--y86c.xn--cof61594i", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\ud807\udc3a.-\uda05\udfcf", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--jk3d.xn----iz68g", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb43\udee9\uff0e\u8d4f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb43\udee9.\u8d4f", + "output": null + }, + { + "comment": "V6", + "input": "xn--2856e.xn--6o3a", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u10ad\uff0e\ud8f4\udde6\u200c", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u10ad.\ud8f4\udde6\u200c", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u2d0d.\ud8f4\udde6\u200c", + "output": null + }, + { + "comment": "V6", + "input": "xn--4kj.xn--p01x", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--4kj.xn--0ug56448b", + "output": null + }, + { + "comment": "V6", + "input": "xn--lnd.xn--p01x", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--lnd.xn--0ug56448b", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u2d0d\uff0e\ud8f4\udde6\u200c", + "output": null + }, + { + "input": "\ud835\udfdb\uff0e\uf9f8", + "output": "3.xn--6vz" + }, + { + "input": "\ud835\udfdb\uff0e\u7b20", + "output": "3.xn--6vz" + }, + { + "input": "3.\u7b20", + "output": "3.xn--6vz" + }, + { + "input": "3.xn--6vz", + "output": "3.xn--6vz" + }, + { + "comment": "C2; P1; V6; V3 (ignored)", + "input": "-\u200d.\u10be\ud800\udef7", + "output": null + }, + { + "comment": "C2; V3 (ignored)", + "input": "-\u200d.\u2d1e\ud800\udef7", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "-.xn--mlj8559d", + "output": "-.xn--mlj8559d" + }, + { + "comment": "C2; V3 (ignored)", + "input": "xn----ugn.xn--mlj8559d", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "-.xn--2nd2315j", + "output": null + }, + { + "comment": "C2; V6; V3 (ignored)", + "input": "xn----ugn.xn--2nd2315j", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03c2\u00df\u0731\uff0e\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03c2\u00df\u0731.\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03a3SS\u0731.\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03c3ss\u0731.\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03a3ss\u0731.\u0bcd", + "output": null + }, + { + "comment": "V5", + "input": "xn--ss-ubc826a.xn--xmc", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--ss-ubc826ab34b.xn--xmc", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03a3\u00df\u0731.\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03c3\u00df\u0731.\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--zca39lk1di19a.xn--xmc", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--zca19ln1di19a.xn--xmc", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03a3SS\u0731\uff0e\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03c3ss\u0731\uff0e\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03a3ss\u0731\uff0e\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03a3\u00df\u0731\uff0e\u0bcd", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u200d\u03c3\u00df\u0731\uff0e\u0bcd", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03c2\uff0e\u03c2\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03c2.\u03c2\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03a3.\u03a3\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03c3.\u03c2\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03c3.\u03c3\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03a3.\u03c3\ud802\ude3f", + "output": null + }, + { + "comment": "V6", + "input": "xn--4xa502av8297a.xn--4xa6055k", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03a3.\u03c2\ud802\ude3f", + "output": null + }, + { + "comment": "V6", + "input": "xn--4xa502av8297a.xn--3xa8055k", + "output": null + }, + { + "comment": "V6", + "input": "xn--3xa702av8297a.xn--3xa8055k", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03a3\uff0e\u03a3\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03c3\uff0e\u03c2\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03c3\uff0e\u03c3\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03a3\uff0e\u03c3\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb5c\udef5\u09cd\u03a3\uff0e\u03c2\ud802\ude3f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud94e\udd12\uff61\ub967", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud94e\udd12\uff61\u1105\u1172\u11b6", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud94e\udd12\u3002\ub967", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud94e\udd12\u3002\u1105\u1172\u11b6", + "output": null + }, + { + "comment": "V6", + "input": "xn--s264a.xn--pw2b", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1846\ud805\udcdd\uff0e\ud83b\udd46", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u1846\ud805\udcdd.\ud83b\udd46", + "output": null + }, + { + "comment": "V6", + "input": "xn--57e0440k.xn--k86h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udbef\udfe6\uff61\u183d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udbef\udfe6\u3002\u183d", + "output": null + }, + { + "comment": "V6", + "input": "xn--j890g.xn--w7e", + "output": null + }, + { + "comment": "C2", + "input": "\u5b03\ud834\udf4c\uff0e\u200d\u0b44", + "output": null + }, + { + "comment": "C2", + "input": "\u5b03\ud834\udf4c.\u200d\u0b44", + "output": null + }, + { + "comment": "V5", + "input": "xn--b6s0078f.xn--0ic", + "output": null + }, + { + "comment": "C2", + "input": "xn--b6s0078f.xn--0ic557h", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c.\ud93d\udee4", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--q823a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug.xn--q823a", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udaa9\uded5\u10a3\u4805\uff0e\ud803\ude11", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udaa9\uded5\u10a3\u4805.\ud803\ude11", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udaa9\uded5\u2d03\u4805.\ud803\ude11", + "output": null + }, + { + "comment": "V6", + "input": "xn--ukju77frl47r.xn--yl0d", + "output": null + }, + { + "comment": "V6", + "input": "xn--bnd074zr557n.xn--yl0d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udaa9\uded5\u2d03\u4805\uff0e\ud803\ude11", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "-\uff61\ufe12", + "output": null + }, + { + "comment": "V3 (ignored); A4_2 (ignored)", + "input": "-\u3002\u3002", + "output": "-.." + }, + { + "comment": "V3 (ignored); A4_2 (ignored)", + "input": "-..", + "output": "-.." + }, + { + "comment": "V6; V3 (ignored)", + "input": "-.xn--y86c", + "output": null + }, + { + "comment": "C2", + "input": "\u200d.F", + "output": null + }, + { + "comment": "C2", + "input": "\u200d.f", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": ".f", + "output": ".f" + }, + { + "comment": "C2", + "input": "xn--1ug.f", + "output": null + }, + { + "input": "f", + "output": "f" + }, + { + "comment": "C2", + "input": "\u200d\u3a32\uff61\u00df", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\u3002\u00df", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\u3002SS", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\u3002ss", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\u3002Ss", + "output": null + }, + { + "input": "xn--9bm.ss", + "output": "xn--9bm.ss" + }, + { + "input": "\u3a32.ss", + "output": "xn--9bm.ss" + }, + { + "input": "\u3a32.SS", + "output": "xn--9bm.ss" + }, + { + "input": "\u3a32.Ss", + "output": "xn--9bm.ss" + }, + { + "comment": "C2", + "input": "xn--1ug914h.ss", + "output": null + }, + { + "comment": "C2", + "input": "xn--1ug914h.xn--zca", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\uff61SS", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\uff61ss", + "output": null + }, + { + "comment": "C2", + "input": "\u200d\u3a32\uff61Ss", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\uff0e\udbc3\ude28", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d.\udbc3\ude28", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--h327f", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1ug.xn--h327f", + "output": null + }, + { + "comment": "V6", + "input": "xn--98e.xn--om9c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\uaaf6\u188f\u0e3a\uff12.\ud800\udee2\u0745\u0f9f\ufe12", + "output": null + }, + { + "comment": "V5", + "input": "\uaaf6\u188f\u0e3a2.\ud800\udee2\u0745\u0f9f\u3002", + "output": null + }, + { + "comment": "V5", + "input": "xn--2-2zf840fk16m.xn--sob093b2m7s.", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--2-2zf840fk16m.xn--sob093bj62sz9d", + "output": null + }, + { + "input": "\ud835\udfce\u3002\u752f", + "output": "0.xn--qny" + }, + { + "input": "0\u3002\u752f", + "output": "0.xn--qny" + }, + { + "input": "0.xn--qny", + "output": "0.xn--qny" + }, + { + "input": "0.\u752f", + "output": "0.xn--qny" + }, + { + "comment": "V5; V3 (ignored)", + "input": "-\u2f86\uff0e\uaaf6", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "-\u820c.\uaaf6", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn----ef8c.xn--2v9a", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "-\uff61\u1898", + "output": "-.xn--ibf" + }, + { + "comment": "V3 (ignored)", + "input": "-\u3002\u1898", + "output": "-.xn--ibf" + }, + { + "comment": "V3 (ignored)", + "input": "-.xn--ibf", + "output": "-.xn--ibf" + }, + { + "comment": "C1", + "input": "\u74bc\ud836\ude2d\uff61\u200c\udb40\udddf", + "output": null + }, + { + "comment": "C1", + "input": "\u74bc\ud836\ude2d\u3002\u200c\udb40\udddf", + "output": null + }, + { + "input": "xn--gky8837e.", + "output": "xn--gky8837e." + }, + { + "input": "\u74bc\ud836\ude2d.", + "output": "xn--gky8837e." + }, + { + "comment": "C1", + "input": "xn--gky8837e.xn--0ug", + "output": null + }, + { + "comment": "C1", + "input": "\u200c.\u200c", + "output": null + }, + { + "comment": "C1", + "input": "xn--0ug.xn--0ug", + "output": null + }, + { + "input": "xn--157b.xn--gnb", + "output": "xn--157b.xn--gnb" + }, + { + "input": "\ud29b.\u0716", + "output": "xn--157b.xn--gnb" + }, + { + "input": "\u1110\u1171\u11c2.\u0716", + "output": "xn--157b.xn--gnb" + }, + { + "comment": "P1; V5; V6", + "input": "\u10b7\uff0e\u05c2\ud804\udd34\ua9b7\ud920\udce8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u10b7\uff0e\ud804\udd34\u05c2\ua9b7\ud920\udce8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u10b7.\ud804\udd34\u05c2\ua9b7\ud920\udce8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u2d17.\ud804\udd34\u05c2\ua9b7\ud920\udce8", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--flj.xn--qdb0605f14ycrms3c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--vnd.xn--qdb0605f14ycrms3c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u2d17\uff0e\ud804\udd34\u05c2\ua9b7\ud920\udce8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u2d17\uff0e\u05c2\ud804\udd34\ua9b7\ud920\udce8", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u2488\u916b\ufe12\u3002\u08d6", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "1.\u916b\u3002\u3002\u08d6", + "output": null + }, + { + "comment": "V5; A4_2 (ignored)", + "input": "1.xn--8j4a..xn--8zb", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--tsh4490bfe8c.xn--8zb", + "output": null + }, + { + "comment": "V6", + "input": "xn--co6h.xn--1-h1g429s", + "output": null + }, + { + "comment": "V6", + "input": "xn--co6h.xn--1-kwssa", + "output": null + }, + { + "comment": "V6", + "input": "xn--co6h.xn--1-h1gs", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua806\u3002\ud8ad\ude8f\u0fb0\u2495", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\ua806\u3002\ud8ad\ude8f\u0fb014.", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--l98a.xn--14-jsj57880f.", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--l98a.xn--dgd218hhp28d", + "output": null + }, + { + "comment": "C2", + "input": "\ud835\udfe04\udb40\uddd7\ud834\ude3b\uff0e\u200d\ud800\udef5\u26e7\u200d", + "output": null + }, + { + "comment": "C2", + "input": "84\udb40\uddd7\ud834\ude3b.\u200d\ud800\udef5\u26e7\u200d", + "output": null + }, + { + "input": "xn--84-s850a.xn--59h6326e", + "output": "xn--84-s850a.xn--59h6326e" + }, + { + "input": "84\ud834\ude3b.\ud800\udef5\u26e7", + "output": "xn--84-s850a.xn--59h6326e" + }, + { + "comment": "C2", + "input": "xn--84-s850a.xn--1uga573cfq1w", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\ud975\udf0e\u2488\uff61\u200c\ud835\udfe4", + "output": null + }, + { + "comment": "C1; P1; V6; A4_2 (ignored)", + "input": "\ud975\udf0e1.\u3002\u200c2", + "output": null + }, + { + "comment": "C1; V6; A4_2 (ignored)", + "input": "xn--1-ex54e..xn--2-rgn", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--tsh94183d.xn--2-rgn", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\uff61\u00df\ud805\udcc3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\u3002\u00df\ud805\udcc3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\u3002SS\ud805\udcc3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\u3002ss\ud805\udcc3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\u3002Ss\ud805\udcc3", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": ".xn--ss-bh7o", + "output": ".xn--ss-bh7o" + }, + { + "comment": "C1; C2", + "input": "xn--0ugb.xn--ss-bh7o", + "output": null + }, + { + "comment": "C1; C2", + "input": "xn--0ugb.xn--zca0732l", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\uff61SS\ud805\udcc3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\uff61ss\ud805\udcc3", + "output": null + }, + { + "comment": "C1; C2", + "input": "\u200d\u200c\udb40\uddaa\uff61Ss\ud805\udcc3", + "output": null + }, + { + "input": "xn--ss-bh7o", + "output": "xn--ss-bh7o" + }, + { + "input": "ss\ud805\udcc3", + "output": "xn--ss-bh7o" + }, + { + "input": "SS\ud805\udcc3", + "output": "xn--ss-bh7o" + }, + { + "input": "Ss\ud805\udcc3", + "output": "xn--ss-bh7o" + }, + { + "comment": "C1; P1; V6", + "input": "\ufe12\u200c\u30f6\u44a9.\ua86a", + "output": null + }, + { + "comment": "C1; A4_2 (ignored)", + "input": "\u3002\u200c\u30f6\u44a9.\ua86a", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": ".xn--qekw60d.xn--gd9a", + "output": ".xn--qekw60d.xn--gd9a" + }, + { + "comment": "C1; A4_2 (ignored)", + "input": ".xn--0ug287dj0o.xn--gd9a", + "output": null + }, + { + "comment": "V6", + "input": "xn--qekw60dns9k.xn--gd9a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug287dj0or48o.xn--gd9a", + "output": null + }, + { + "input": "xn--qekw60d.xn--gd9a", + "output": "xn--qekw60d.xn--gd9a" + }, + { + "input": "\u30f6\u44a9.\ua86a", + "output": "xn--qekw60d.xn--gd9a" + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\u2488\ud852\udf8d.\udb49\udccb\u1a60", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c1.\ud852\udf8d.\udb49\udccb\u1a60", + "output": null + }, + { + "comment": "V6", + "input": "1.xn--4x6j.xn--jof45148n", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--1-rgn.xn--4x6j.xn--jof45148n", + "output": null + }, + { + "comment": "V6", + "input": "xn--tshw462r.xn--jof45148n", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ug88o7471d.xn--jof45148n", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud834\udd75\uff61\ud835\udfeb\ud838\udc08\u4b3a\u2488", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud834\udd75\u30029\ud838\udc08\u4b3a1.", + "output": null + }, + { + "comment": "V6", + "input": "xn--3f1h.xn--91-030c1650n.", + "output": null + }, + { + "comment": "V6", + "input": "xn--3f1h.xn--9-ecp936non25a", + "output": null + }, + { + "input": "xn--8c1a.xn--2ib8jn539l", + "output": "xn--8c1a.xn--2ib8jn539l" + }, + { + "input": "\u821b.\u067d\ud83a\udd34\u06bb", + "output": "xn--8c1a.xn--2ib8jn539l" + }, + { + "input": "\u821b.\u067d\ud83a\udd12\u06bb", + "output": "xn--8c1a.xn--2ib8jn539l" + }, + { + "comment": "V5; V3 (ignored)", + "input": "-\udb40\udd710\uff61\u17cf\u1dfd\ud187\uc2ed", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "-\udb40\udd710\uff61\u17cf\u1dfd\u1110\u1168\u11aa\u1109\u1175\u11b8", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "-\udb40\udd710\u3002\u17cf\u1dfd\ud187\uc2ed", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "-\udb40\udd710\u3002\u17cf\u1dfd\u1110\u1168\u11aa\u1109\u1175\u11b8", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "-0.xn--r4e872ah77nghm", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u10bf\u10b5\u10e0\uff61\u0b4d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u10bf\u10b5\u10e0\u3002\u0b4d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u2d1f\u2d15\u10e0\u3002\u0b4d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u10bf\u10b5\u1ca0\u3002\u0b4d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--tndt4hvw.xn--9ic", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--1od7wz74eeb.xn--9ic", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u2d1f\u2d15\u10e0\uff61\u0b4d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u10bf\u10b5\u1ca0\uff61\u0b4d", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u10bf\u2d15\u10e0\u3002\u0b4d", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--3nd0etsm92g.xn--9ic", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u115f\u10bf\u2d15\u10e0\uff61\u0b4d", + "output": null + }, + { + "comment": "V6", + "input": "xn--l96h.xn--03e93aq365d", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\ud835\udfdb\ud834\uddaa\ua8c4\uff61\ua8ea-", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\ud835\udfdb\ua8c4\ud834\uddaa\uff61\ua8ea-", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "3\ua8c4\ud834\uddaa\u3002\ua8ea-", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn--3-sl4eu679e.xn----xn4e", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1139\uff61\u0eca\uda42\udfe4\udb40\udd1e", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1139\u3002\u0eca\uda42\udfe4\udb40\udd1e", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--lrd.xn--s8c05302k", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10a6\udaae\udca9\uff0e\udb40\udda1\ufe09\ud83a\udd0d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10a6\udaae\udca9.\udb40\udda1\ufe09\ud83a\udd0d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d06\udaae\udca9.\udb40\udda1\ufe09\ud83a\udd2f", + "output": null + }, + { + "comment": "V6", + "input": "xn--xkjw3965g.xn--ne6h", + "output": null + }, + { + "comment": "V6", + "input": "xn--end82983m.xn--ne6h", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d06\udaae\udca9\uff0e\udb40\udda1\ufe09\ud83a\udd2f", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d06\udaae\udca9.\udb40\udda1\ufe09\ud83a\udd0d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u2d06\udaae\udca9\uff0e\udb40\udda1\ufe09\ud83a\udd0d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udee8.\ud9d5\udfe2\ud835\udfe8\ua8c4", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udee8.\ud9d5\udfe26\ua8c4", + "output": null + }, + { + "comment": "V6", + "input": "xn--mi60a.xn--6-sl4es8023c", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud800\udef8\udb79\ude0b\u10c2.\u10a1", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud800\udef8\udb79\ude0b\u2d22.\u2d01", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud800\udef8\udb79\ude0b\u10c2.\u2d01", + "output": null + }, + { + "comment": "V6", + "input": "xn--6nd5215jr2u0h.xn--skj", + "output": null + }, + { + "comment": "V6", + "input": "xn--qlj1559dr224h.xn--skj", + "output": null + }, + { + "comment": "V6", + "input": "xn--6nd5215jr2u0h.xn--8md", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udc7f\ua806\u2084\uda65\udf86\uff61\ud88a\ude67\udb41\udcb9\u03c2", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udc7f\ua8064\uda65\udf86\u3002\ud88a\ude67\udb41\udcb9\u03c2", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udc7f\ua8064\uda65\udf86\u3002\ud88a\ude67\udb41\udcb9\u03a3", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udc7f\ua8064\uda65\udf86\u3002\ud88a\ude67\udb41\udcb9\u03c3", + "output": null + }, + { + "comment": "V6", + "input": "xn--4-w93ej7463a9io5a.xn--4xa31142bk3f0d", + "output": null + }, + { + "comment": "V6", + "input": "xn--4-w93ej7463a9io5a.xn--3xa51142bk3f0d", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udc7f\ua806\u2084\uda65\udf86\uff61\ud88a\ude67\udb41\udcb9\u03a3", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud91d\udc7f\ua806\u2084\uda65\udf86\uff61\ud88a\ude67\udb41\udcb9\u03c3", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud8ba\udcac\u3002\u0729\u3002\ucbd95", + "output": null + }, + { + "comment": "P1; V6", + "input": "\ud8ba\udcac\u3002\u0729\u3002\u110d\u1173\u11ac5", + "output": null + }, + { + "comment": "V6", + "input": "xn--t92s.xn--znb.xn--5-y88f", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u17ca.\u200d\ud835\udfee\ud804\udc3f", + "output": null + }, + { + "comment": "C2; V5", + "input": "\u17ca.\u200d2\ud804\udc3f", + "output": null + }, + { + "comment": "V5", + "input": "xn--m4e.xn--2-ku7i", + "output": null + }, + { + "comment": "C2; V5", + "input": "xn--m4e.xn--2-tgnv469h", + "output": null + }, + { + "comment": "V5", + "input": "\uaaf6\u3002\u5b36\u00df\u847d", + "output": null + }, + { + "comment": "V5", + "input": "\uaaf6\u3002\u5b36SS\u847d", + "output": null + }, + { + "comment": "V5", + "input": "\uaaf6\u3002\u5b36ss\u847d", + "output": null + }, + { + "comment": "V5", + "input": "\uaaf6\u3002\u5b36Ss\u847d", + "output": null + }, + { + "comment": "V5", + "input": "xn--2v9a.xn--ss-q40dp97m", + "output": null + }, + { + "comment": "V5", + "input": "xn--2v9a.xn--zca7637b14za", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u03c2\ud805\udc3d\ud896\udc88\ud805\udf2b\uff61\ud83a\udf29\u200c\ud802\udec4", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u03c2\ud805\udc3d\ud896\udc88\ud805\udf2b\u3002\ud83a\udf29\u200c\ud802\udec4", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u03a3\ud805\udc3d\ud896\udc88\ud805\udf2b\u3002\ud83a\udf29\u200c\ud802\udec4", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u03c3\ud805\udc3d\ud896\udc88\ud805\udf2b\u3002\ud83a\udf29\u200c\ud802\udec4", + "output": null + }, + { + "comment": "V6", + "input": "xn--4xa2260lk3b8z15g.xn--tw9ct349a", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--4xa2260lk3b8z15g.xn--0ug4653g2xzf", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--3xa4260lk3b8z15g.xn--0ug4653g2xzf", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u03a3\ud805\udc3d\ud896\udc88\ud805\udf2b\uff61\ud83a\udf29\u200c\ud802\udec4", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u03c3\ud805\udc3d\ud896\udc88\ud805\udf2b\uff61\ud83a\udf29\u200c\ud802\udec4", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2ea2\ud9df\ude85\ud835\udfe4\uff61\u200d\ud83d\udeb7", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2ea2\ud9df\ude852\u3002\u200d\ud83d\udeb7", + "output": null + }, + { + "comment": "V6", + "input": "xn--2-4jtr4282f.xn--m78h", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--2-4jtr4282f.xn--1ugz946p", + "output": null + }, + { + "comment": "V5", + "input": "\ud836\ude25\u3002\u2adf\ud804\ude3e", + "output": null + }, + { + "comment": "V5", + "input": "xn--n82h.xn--63iw010f", + "output": null + }, + { + "comment": "C1; P1; V5; V6; V3 (ignored)", + "input": "-\u1897\u200c\ud83c\udd04.\ud805\udf22", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----pck1820x.xn--9h2d", + "output": null + }, + { + "comment": "C1; V5; V6; V3 (ignored)", + "input": "xn----pck312bx563c.xn--9h2d", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\u17b4.\ucb87-", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "\u17b4.\u110d\u1170\u11ae-", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--z3e.xn----938f", + "output": null + }, + { + "comment": "C1; P1; V6", + "input": "\u200c\ud805\udcc2\u3002\u2488-\udbc2\ude9b", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\u200c\ud805\udcc2\u30021.-\udbc2\ude9b", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn--wz1d.1.xn----rg03o", + "output": null + }, + { + "comment": "C1; V6; V3 (ignored)", + "input": "xn--0ugy057g.1.xn----rg03o", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--wz1d.xn----dcp29674o", + "output": null + }, + { + "comment": "C1; V6", + "input": "xn--0ugy057g.xn----dcp29674o", + "output": null + }, + { + "comment": "A4_2 (ignored)", + "input": ".xn--hcb32bni", + "output": ".xn--hcb32bni" + }, + { + "input": "xn--hcb32bni", + "output": "xn--hcb32bni" + }, + { + "input": "\u06bd\u0663\u0596", + "output": "xn--hcb32bni" + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u0f94\ua84b-\uff0e-\ud81a\udf34", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "\u0f94\ua84b-.-\ud81a\udf34", + "output": null + }, + { + "comment": "V5; V3 (ignored)", + "input": "xn----ukg9938i.xn----4u5m", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\ud9bd\udcb3-\u22e2\u200c\uff0e\u6807-", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\ud9bd\udcb3-\u2291\u0338\u200c\uff0e\u6807-", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\ud9bd\udcb3-\u22e2\u200c.\u6807-", + "output": null + }, + { + "comment": "C1; P1; V6; V3 (ignored)", + "input": "\ud9bd\udcb3-\u2291\u0338\u200c.\u6807-", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----9mo67451g.xn----qj7b", + "output": null + }, + { + "comment": "C1; V6; V3 (ignored)", + "input": "xn----sgn90kn5663a.xn----qj7b", + "output": null + }, + { + "comment": "P1; V5; V6; V3 (ignored)", + "input": "-\ud914\ude74.\u06e0\u189a-", + "output": null + }, + { + "comment": "V5; V6; V3 (ignored)", + "input": "xn----qi38c.xn----jxc827k", + "output": null + }, + { + "comment": "P1; V6; A4_2 (ignored)", + "input": "\u3002\u0635\u0649\u0e37\u0644\u0627\u3002\u5c93\u1bf2\udb43\udf83\u1842", + "output": null + }, + { + "comment": "V6; A4_2 (ignored)", + "input": ".xn--mgb1a7bt462h.xn--17e10qe61f9r71s", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "\u188c\uff0e-\u085a", + "output": "xn--59e.xn----5jd" + }, + { + "comment": "V3 (ignored)", + "input": "\u188c.-\u085a", + "output": "xn--59e.xn----5jd" + }, + { + "comment": "V3 (ignored)", + "input": "xn--59e.xn----5jd", + "output": "xn--59e.xn----5jd" + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2\uff0e\u00df", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2.\u00df", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2.SS", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2.ss", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2.Ss", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn----9tg11172akr8b.ss", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn----9tg11172akr8b.xn--zca", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2\uff0eSS", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2\uff0ess", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u1039-\ud82a\udfad\ud83d\udfa2\uff0eSs", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\u9523\u3002\u0a4d\udb41\ude3b\udb41\ude86", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--gc5a.xn--ybc83044ppga", + "output": null + }, + { + "input": "xn--8gb2338k.xn--lhb0154f", + "output": "xn--8gb2338k.xn--lhb0154f" + }, + { + "input": "\u063d\ud804\ude3e.\u0649\ua92b", + "output": "xn--8gb2338k.xn--lhb0154f" + }, + { + "comment": "P1; V6", + "input": "\u10c1\u10b16\u0318\u3002\u00df\u1b03", + "output": null + }, + { + "input": "\u2d21\u2d116\u0318\u3002\u00df\u1b03", + "output": "xn--6-8cb7433a2ba.xn--zca894k" + }, + { + "comment": "P1; V6", + "input": "\u10c1\u10b16\u0318\u3002SS\u1b03", + "output": null + }, + { + "input": "\u2d21\u2d116\u0318\u3002ss\u1b03", + "output": "xn--6-8cb7433a2ba.xn--ss-2vq" + }, + { + "comment": "P1; V6", + "input": "\u10c1\u2d116\u0318\u3002Ss\u1b03", + "output": null + }, + { + "comment": "V6", + "input": "xn--6-8cb306hms1a.xn--ss-2vq", + "output": null + }, + { + "input": "xn--6-8cb7433a2ba.xn--ss-2vq", + "output": "xn--6-8cb7433a2ba.xn--ss-2vq" + }, + { + "input": "\u2d21\u2d116\u0318.ss\u1b03", + "output": "xn--6-8cb7433a2ba.xn--ss-2vq" + }, + { + "comment": "P1; V6", + "input": "\u10c1\u10b16\u0318.SS\u1b03", + "output": null + }, + { + "comment": "P1; V6", + "input": "\u10c1\u2d116\u0318.Ss\u1b03", + "output": null + }, + { + "comment": "V6", + "input": "xn--6-8cb555h2b.xn--ss-2vq", + "output": null + }, + { + "input": "xn--6-8cb7433a2ba.xn--zca894k", + "output": "xn--6-8cb7433a2ba.xn--zca894k" + }, + { + "input": "\u2d21\u2d116\u0318.\u00df\u1b03", + "output": "xn--6-8cb7433a2ba.xn--zca894k" + }, + { + "comment": "V6", + "input": "xn--6-8cb555h2b.xn--zca894k", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\udb40\udd0f\ud81a\udf34\udb43\udcbd\uff61\uffa0", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\udb40\udd0f\ud81a\udf34\udb43\udcbd\u3002\u1160", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--619ep9154c.xn--psd", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--619ep9154c.xn--cl7c", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb42\udf54.\ud800\udef1\u2082", + "output": null + }, + { + "comment": "P1; V6", + "input": "\udb42\udf54.\ud800\udef12", + "output": null + }, + { + "comment": "V6", + "input": "xn--vi56e.xn--2-w91i", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2dbf.\u00df\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2dbf.SS\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2dbf.ss\u200d", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u2dbf.Ss\u200d", + "output": null + }, + { + "comment": "V6", + "input": "xn--7pj.ss", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--7pj.xn--ss-n1t", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--7pj.xn--zca870n", + "output": null + }, + { + "comment": "C1", + "input": "\u6889\u3002\u200c", + "output": null + }, + { + "input": "xn--7zv.", + "output": "xn--7zv." + }, + { + "input": "\u6889.", + "output": "xn--7zv." + }, + { + "comment": "C1", + "input": "xn--7zv.xn--0ug", + "output": null + }, + { + "input": "xn--iwb.ss", + "output": "xn--iwb.ss" + }, + { + "input": "\u0853.ss", + "output": "xn--iwb.ss" + }, + { + "input": "\u0853.SS", + "output": "xn--iwb.ss" + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\u40da\u87e5-\u3002-\ud9b5\udc98\u2488", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\u40da\u87e5-\u3002-\ud9b5\udc981.", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----n50a258u.xn---1-up07j.", + "output": null + }, + { + "comment": "V6; V3 (ignored)", + "input": "xn----n50a258u.xn----ecp33805f", + "output": null + }, + { + "comment": "V3 (ignored)", + "input": "-\uff61\u2e90", + "output": "-.xn--6vj" + }, + { + "comment": "V3 (ignored)", + "input": "-\u3002\u2e90", + "output": "-.xn--6vj" + }, + { + "comment": "V3 (ignored)", + "input": "-.xn--6vj", + "output": "-.xn--6vj" + }, + { + "comment": "P1; V5; V6", + "input": "\udb43\udc29\ud807\udcac\uff0e\u065c", + "output": null + }, + { + "comment": "P1; V5; V6", + "input": "\udb43\udc29\ud807\udcac.\u065c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--sn3d59267c.xn--4hb", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud800\udf7a.\ud928\uddc3\u200c", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--ie8c.xn--2g51a", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--ie8c.xn--0ug03366c", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u200d\u8954\u3002\u10bc5\ua86e\ud995\udf4f", + "output": null + }, + { + "comment": "C2; P1; V6", + "input": "\u200d\u200d\u8954\u3002\u2d1c5\ua86e\ud995\udf4f", + "output": null + }, + { + "comment": "V6", + "input": "xn--2u2a.xn--5-uws5848bpf44e", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1uga7691f.xn--5-uws5848bpf44e", + "output": null + }, + { + "comment": "V6", + "input": "xn--2u2a.xn--5-r1g7167ipfw8d", + "output": null + }, + { + "comment": "C2; V6", + "input": "xn--1uga7691f.xn--5-r1g7167ipfw8d", + "output": null + }, + { + "input": "xn--ix9c26l.xn--q0s", + "output": "xn--ix9c26l.xn--q0s" + }, + { + "input": "\ud802\udedc\ud804\udf3c.\u5a40", + "output": "xn--ix9c26l.xn--q0s" + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud835\udfd6\u00df\uff0e\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8\u00df.\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8\u00df.\udb40\udd10-?\u2d0f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8SS.\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8ss.\udb40\udd10-?\u2d0f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8ss.\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8ss.xn---?-gfk", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8ss.xn---?-261a", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "xn--8-qfa.xn---?-261a", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "xn--8-qfa.xn---?-gfk", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud835\udfd6\u00df\uff0e\udb40\udd10-?\u2d0f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud835\udfd6SS\uff0e\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud835\udfd6ss\uff0e\udb40\udd10-?\u2d0f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud835\udfd6ss\uff0e\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8ss.-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8ss.-?\u2d0f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8SS.-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "xn--8-qfa.-?\u2d0f", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "XN--8-QFA.-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "Xn--8-Qfa.-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "xn--8-qfa.-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "\ud835\udfd6Ss\uff0e\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "P1; V6; V3 (ignored)", + "input": "8Ss.\udb40\udd10-?\u10af", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ua9b9\u200d\ud077\ud8af\udda1\uff61\u2082", + "output": null + }, + { + "comment": "C2; P1; V5; V6", + "input": "\ua9b9\u200d\u110f\u1173\u11b2\ud8af\udda1\uff61\u2082", + "output": null + }, + { + "input": "\ud802\udec0\uff0e\u0689\ud804\udf00", + "output": "xn--pw9c.xn--fjb8658k" + }, + { + "input": "\ud802\udec0.\u0689\ud804\udf00", + "output": "xn--pw9c.xn--fjb8658k" + }, + { + "input": "xn--pw9c.xn--fjb8658k", + "output": "xn--pw9c.xn--fjb8658k" + }, + { + "comment": "C2", + "input": "\ud800\udef7\u3002\u200d", + "output": null + }, + { + "input": "xn--r97c.", + "output": "xn--r97c." + }, + { + "input": "\ud800\udef7.", + "output": "xn--r97c." + }, + { + "comment": "C2", + "input": "xn--r97c.xn--1ug", + "output": null + }, + { + "comment": "V5", + "input": "\ud807\udc33\ud804\ude2f\u3002\u296a", + "output": null + }, + { + "comment": "V5", + "input": "xn--2g1d14o.xn--jti", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud804\udd80\u4074\ud952\udde3\uff0e\u10b5\ud835\udfdc\u200c\u0348", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud804\udd80\u4074\ud952\udde3.\u10b54\u200c\u0348", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud804\udd80\u4074\ud952\udde3.\u2d154\u200c\u0348", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--1mnx647cg3x1b.xn--4-zfb5123a", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--1mnx647cg3x1b.xn--4-zfb502tlsl", + "output": null + }, + { + "comment": "V5; V6", + "input": "xn--1mnx647cg3x1b.xn--4-zfb324h", + "output": null + }, + { + "comment": "C1; V5; V6", + "input": "xn--1mnx647cg3x1b.xn--4-zfb324h32o", + "output": null + }, + { + "comment": "C1; P1; V5; V6", + "input": "\ud804\udd80\u4074\ud952\udde3\uff0e\u2d15\ud835\udfdc\u200c\u0348", + "output": null + } +] diff --git a/testing/web-platform/tests/url/resources/a-element-origin.js b/testing/web-platform/tests/url/resources/a-element-origin.js new file mode 100644 index 0000000000..c1c24c8986 --- /dev/null +++ b/testing/web-platform/tests/url/resources/a-element-origin.js @@ -0,0 +1,36 @@ +promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); + +function setBase(base) { + document.getElementById("base").href = base +} + +function bURL(url, base) { + setBase(base); + const a = document.createElement("a"); + a.setAttribute("href", url); + return a; +} + +function runURLTests(urlTests) { + for (const expected of urlTests) { + // Skip comments and tests without "origin" expectation + if (typeof expected === "string" || !("origin" in expected)) + continue; + + // Fragments are relative against "about:blank" (this might always be redundant due to requiring "origin" in expected) + if (expected.base === null && expected.input.startsWith("#")) + continue; + + // HTML special cases data: and javascript: URLs in <base> + if (expected.base !== null && (expected.base.startsWith("data:") || expected.base.startsWith("javascript:"))) + continue; + + // We cannot use a null base for HTML tests + const base = expected.base === null ? "about:blank" : expected.base; + + test(function() { + var url = bURL(expected.input, base) + assert_equals(url.origin, expected.origin, "origin") + }, "Parsing origin: <" + expected.input + "> against <" + base + ">") + } +} diff --git a/testing/web-platform/tests/url/resources/a-element.js b/testing/web-platform/tests/url/resources/a-element.js new file mode 100644 index 0000000000..cff4160d32 --- /dev/null +++ b/testing/web-platform/tests/url/resources/a-element.js @@ -0,0 +1,63 @@ +promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); + +function setBase(base) { + document.getElementById("base").href = base; +} + +function bURL(url, base) { + setBase(base); + const a = document.createElement("a"); + a.setAttribute("href", url); + return a; +} + +function runURLTests(urlTests) { + for (const expected of urlTests) { + // Skip comments + if (typeof expected === "string") + continue; + + // Fragments are relative against "about:blank" + if (expected.relativeTo === "any-base") + continue; + + // HTML special cases data: and javascript: URLs in <base> + if (expected.base !== null && (expected.base.startsWith("data:") || expected.base.startsWith("javascript:"))) + continue; + + // We cannot use a null base for HTML tests + const base = expected.base === null ? "about:blank" : expected.base; + + function getKey(expected) { + if (expected.protocol) { + return expected.protocol.replace(":", ""); + } + if (expected.failure) { + return expected.input.split(":")[0]; + } + return "other"; + } + + subsetTestByKey(getKey(expected), test, function() { + var url = bURL(expected.input, base) + if(expected.failure) { + if(url.protocol !== ':') { + assert_unreached("Expected URL to fail parsing") + } + assert_equals(url.href, expected.input, "failure should set href to input") + return + } + + assert_equals(url.href, expected.href, "href") + assert_equals(url.protocol, expected.protocol, "protocol") + assert_equals(url.username, expected.username, "username") + assert_equals(url.password, expected.password, "password") + assert_equals(url.host, expected.host, "host") + assert_equals(url.hostname, expected.hostname, "hostname") + assert_equals(url.port, expected.port, "port") + assert_equals(url.pathname, expected.pathname, "pathname") + assert_equals(url.search, expected.search, "search") + assert_equals(url.hash, expected.hash, "hash") + }, "Parsing: <" + expected.input + "> against <" + base + ">") + } +} diff --git a/testing/web-platform/tests/url/resources/percent-encoding.json b/testing/web-platform/tests/url/resources/percent-encoding.json new file mode 100644 index 0000000000..eccd1db62f --- /dev/null +++ b/testing/web-platform/tests/url/resources/percent-encoding.json @@ -0,0 +1,48 @@ +[ + "Tests for percent-encoding.", + { + "input": "\u2020", + "output": { + "big5": "%26%238224%3B", + "euc-kr": "%A2%D3", + "utf-8": "%E2%80%A0", + "windows-1252": "%86" + } + }, + "This uses a trailing A to prevent the URL parser from trimming the C0 control.", + { + "input": "\u000EA", + "output": { + "big5": "%0EA", + "iso-2022-jp": "%26%2365533%3BA", + "utf-8": "%0EA" + } + }, + { + "input": "\u203E\u005C", + "output": { + "iso-2022-jp": "%1B(J~%1B(B\\", + "utf-8": "%E2%80%BE\\" + } + }, + { + "input": "\uE5E5", + "output": { + "gb18030": "%26%2358853%3B", + "utf-8": "%EE%97%A5" + } + }, + { + "input": "\u2212", + "output": { + "shift_jis": "%81|", + "utf-8": "%E2%88%92" + } + }, + { + "input": "á|", + "output": { + "utf-8": "%C3%A1|" + } + } +] diff --git a/testing/web-platform/tests/url/resources/percent-encoding.py b/testing/web-platform/tests/url/resources/percent-encoding.py new file mode 100644 index 0000000000..e8fbb7d3b3 --- /dev/null +++ b/testing/web-platform/tests/url/resources/percent-encoding.py @@ -0,0 +1,23 @@ +import base64 +from wptserve.utils import isomorphic_decode + +# Use numeric references to let the HTML parser take care of inserting the correct code points +# rather than trying to figure out the necessary bytes for each encoding. (The latter can be +# especially tricky given that Python does not implement the Encoding Standard.) +def numeric_references(input): + output = b"" + for cp in input: + output += b"&#x" + format(ord(cp), u"X").encode(u"utf-8") + b";" + return output + +def main(request, response): + # Undo the "magic" space with + replacement as otherwise base64 decoding will fail. + value = request.GET.first(b"value").replace(b" ", b"+") + encoding = request.GET.first(b"encoding") + + output_value = numeric_references(base64.b64decode(value).decode(u"utf-8")) + return ( + [(b"Content-Type", b"text/html;charset=" + encoding)], + b"""<!doctype html> +<a href="https://doesnotmatter.invalid/?%s#%s">test</a> +""" % (output_value, output_value)) diff --git a/testing/web-platform/tests/url/resources/setters_tests.json b/testing/web-platform/tests/url/resources/setters_tests.json new file mode 100644 index 0000000000..82adf4cdce --- /dev/null +++ b/testing/web-platform/tests/url/resources/setters_tests.json @@ -0,0 +1,2380 @@ +{ + "comment": [ + "## Tests for setters of https://url.spec.whatwg.org/#urlutils-members", + "", + "This file contains a JSON object.", + "Other than 'comment', each key is an attribute of the `URL` interface", + "defined in WHATWG’s URL Standard.", + "The values are arrays of test case objects for that attribute.", + "", + "To run a test case for the attribute `attr`:", + "", + "* Create a new `URL` object with the value for the 'href' key", + " the constructor single parameter. (Without a base URL.)", + " This must not throw.", + "* Set the attribute `attr` to (invoke its setter with)", + " with the value of for 'new_value' key.", + "* The value for the 'expected' key is another object.", + " For each `key` / `value` pair of that object,", + " get the attribute `key` (invoke its getter).", + " The returned string must be equal to `value`.", + "", + "Note: the 'href' setter is already covered by urltestdata.json." + ], + "protocol": [ + { + "comment": "The empty string is not a valid scheme. Setter leaves the URL unchanged.", + "href": "a://example.net", + "new_value": "", + "expected": { + "href": "a://example.net", + "protocol": "a:" + } + }, + { + "href": "a://example.net", + "new_value": "b", + "expected": { + "href": "b://example.net", + "protocol": "b:" + } + }, + { + "href": "javascript:alert(1)", + "new_value": "defuse", + "expected": { + "href": "defuse:alert(1)", + "protocol": "defuse:" + } + }, + { + "comment": "Upper-case ASCII is lower-cased", + "href": "a://example.net", + "new_value": "B", + "expected": { + "href": "b://example.net", + "protocol": "b:" + } + }, + { + "comment": "Non-ASCII is rejected", + "href": "a://example.net", + "new_value": "é", + "expected": { + "href": "a://example.net", + "protocol": "a:" + } + }, + { + "comment": "No leading digit", + "href": "a://example.net", + "new_value": "0b", + "expected": { + "href": "a://example.net", + "protocol": "a:" + } + }, + { + "comment": "No leading punctuation", + "href": "a://example.net", + "new_value": "+b", + "expected": { + "href": "a://example.net", + "protocol": "a:" + } + }, + { + "href": "a://example.net", + "new_value": "bC0+-.", + "expected": { + "href": "bc0+-.://example.net", + "protocol": "bc0+-.:" + } + }, + { + "comment": "Only some punctuation is acceptable", + "href": "a://example.net", + "new_value": "b,c", + "expected": { + "href": "a://example.net", + "protocol": "a:" + } + }, + { + "comment": "Non-ASCII is rejected", + "href": "a://example.net", + "new_value": "bé", + "expected": { + "href": "a://example.net", + "protocol": "a:" + } + }, + { + "comment": "Can’t switch from URL containing username/password/port to file", + "href": "http://test@example.net", + "new_value": "file", + "expected": { + "href": "http://test@example.net/", + "protocol": "http:" + } + }, + { + "href": "https://example.net:1234", + "new_value": "file", + "expected": { + "href": "https://example.net:1234/", + "protocol": "https:" + } + }, + { + "href": "wss://x:x@example.net:1234", + "new_value": "file", + "expected": { + "href": "wss://x:x@example.net:1234/", + "protocol": "wss:" + } + }, + { + "comment": "Can’t switch from file URL with no host", + "href": "file://localhost/", + "new_value": "http", + "expected": { + "href": "file:///", + "protocol": "file:" + } + }, + { + "href": "file:///test", + "new_value": "https", + "expected": { + "href": "file:///test", + "protocol": "file:" + } + }, + { + "href": "file:", + "new_value": "wss", + "expected": { + "href": "file:///", + "protocol": "file:" + } + }, + { + "comment": "Can’t switch from special scheme to non-special", + "href": "http://example.net", + "new_value": "b", + "expected": { + "href": "http://example.net/", + "protocol": "http:" + } + }, + { + "href": "file://hi/path", + "new_value": "s", + "expected": { + "href": "file://hi/path", + "protocol": "file:" + } + }, + { + "href": "https://example.net", + "new_value": "s", + "expected": { + "href": "https://example.net/", + "protocol": "https:" + } + }, + { + "href": "ftp://example.net", + "new_value": "test", + "expected": { + "href": "ftp://example.net/", + "protocol": "ftp:" + } + }, + { + "comment": "Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.", + "href": "mailto:me@example.net", + "new_value": "http", + "expected": { + "href": "mailto:me@example.net", + "protocol": "mailto:" + } + }, + { + "comment": "Can’t switch from non-special scheme to special", + "href": "ssh://me@example.net", + "new_value": "http", + "expected": { + "href": "ssh://me@example.net", + "protocol": "ssh:" + } + }, + { + "href": "ssh://me@example.net", + "new_value": "https", + "expected": { + "href": "ssh://me@example.net", + "protocol": "ssh:" + } + }, + { + "href": "ssh://me@example.net", + "new_value": "file", + "expected": { + "href": "ssh://me@example.net", + "protocol": "ssh:" + } + }, + { + "href": "ssh://example.net", + "new_value": "file", + "expected": { + "href": "ssh://example.net", + "protocol": "ssh:" + } + }, + { + "href": "nonsense:///test", + "new_value": "https", + "expected": { + "href": "nonsense:///test", + "protocol": "nonsense:" + } + }, + { + "comment": "Stuff after the first ':' is ignored", + "href": "http://example.net", + "new_value": "https:foo : bar", + "expected": { + "href": "https://example.net/", + "protocol": "https:" + } + }, + { + "comment": "Stuff after the first ':' is ignored", + "href": "data:text/html,<p>Test", + "new_value": "view-source+data:foo : bar", + "expected": { + "href": "view-source+data:text/html,<p>Test", + "protocol": "view-source+data:" + } + }, + { + "comment": "Port is set to null if it is the default for new scheme.", + "href": "http://foo.com:443/", + "new_value": "https", + "expected": { + "href": "https://foo.com/", + "protocol": "https:", + "port": "" + } + }, + { + "comment": "Tab and newline are stripped", + "href": "http://test/", + "new_value": "h\u000D\u000Att\u0009ps", + "expected": { + "href": "https://test/", + "protocol": "https:", + "port": "" + } + }, + { + "href": "http://test/", + "new_value": "https\u000D", + "expected": { + "href": "https://test/", + "protocol": "https:" + } + }, + { + "comment": "Non-tab/newline C0 controls result in no-op", + "href": "http://test/", + "new_value": "https\u0000", + "expected": { + "href": "http://test/", + "protocol": "http:" + } + }, + { + "href": "http://test/", + "new_value": "https\u000C", + "expected": { + "href": "http://test/", + "protocol": "http:" + } + }, + { + "href": "http://test/", + "new_value": "https\u000E", + "expected": { + "href": "http://test/", + "protocol": "http:" + } + }, + { + "href": "http://test/", + "new_value": "https\u0020", + "expected": { + "href": "http://test/", + "protocol": "http:" + } + } + ], + "username": [ + { + "comment": "No host means no username", + "href": "file:///home/you/index.html", + "new_value": "me", + "expected": { + "href": "file:///home/you/index.html", + "username": "" + } + }, + { + "comment": "No host means no username", + "href": "unix:/run/foo.socket", + "new_value": "me", + "expected": { + "href": "unix:/run/foo.socket", + "username": "" + } + }, + { + "comment": "Cannot-be-a-base means no username", + "href": "mailto:you@example.net", + "new_value": "me", + "expected": { + "href": "mailto:you@example.net", + "username": "" + } + }, + { + "href": "javascript:alert(1)", + "new_value": "wario", + "expected": { + "href": "javascript:alert(1)", + "username": "" + } + }, + { + "href": "http://example.net", + "new_value": "me", + "expected": { + "href": "http://me@example.net/", + "username": "me" + } + }, + { + "href": "http://:secret@example.net", + "new_value": "me", + "expected": { + "href": "http://me:secret@example.net/", + "username": "me" + } + }, + { + "href": "http://me@example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "username": "" + } + }, + { + "href": "http://me:secret@example.net", + "new_value": "", + "expected": { + "href": "http://:secret@example.net/", + "username": "" + } + }, + { + "comment": "UTF-8 percent encoding with the userinfo encode set.", + "href": "http://example.net", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "http://%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/", + "username": "%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is.", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://%c3%89t%C3%A9@example.net/", + "username": "%c3%89t%C3%A9" + } + }, + { + "href": "sc:///", + "new_value": "x", + "expected": { + "href": "sc:///", + "username": "" + } + }, + { + "href": "javascript://x/", + "new_value": "wario", + "expected": { + "href": "javascript://wario@x/", + "username": "wario" + } + }, + { + "href": "file://test/", + "new_value": "test", + "expected": { + "href": "file://test/", + "username": "" + } + } + ], + "password": [ + { + "comment": "No host means no password", + "href": "file:///home/me/index.html", + "new_value": "secret", + "expected": { + "href": "file:///home/me/index.html", + "password": "" + } + }, + { + "comment": "No host means no password", + "href": "unix:/run/foo.socket", + "new_value": "secret", + "expected": { + "href": "unix:/run/foo.socket", + "password": "" + } + }, + { + "comment": "Cannot-be-a-base means no password", + "href": "mailto:me@example.net", + "new_value": "secret", + "expected": { + "href": "mailto:me@example.net", + "password": "" + } + }, + { + "href": "http://example.net", + "new_value": "secret", + "expected": { + "href": "http://:secret@example.net/", + "password": "secret" + } + }, + { + "href": "http://me@example.net", + "new_value": "secret", + "expected": { + "href": "http://me:secret@example.net/", + "password": "secret" + } + }, + { + "href": "http://:secret@example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "password": "" + } + }, + { + "href": "http://me:secret@example.net", + "new_value": "", + "expected": { + "href": "http://me@example.net/", + "password": "" + } + }, + { + "comment": "UTF-8 percent encoding with the userinfo encode set.", + "href": "http://example.net", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "http://:%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/", + "password": "%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is.", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://:%c3%89t%C3%A9@example.net/", + "password": "%c3%89t%C3%A9" + } + }, + { + "href": "sc:///", + "new_value": "x", + "expected": { + "href": "sc:///", + "password": "" + } + }, + { + "href": "javascript://x/", + "new_value": "bowser", + "expected": { + "href": "javascript://:bowser@x/", + "password": "bowser" + } + }, + { + "href": "file://test/", + "new_value": "test", + "expected": { + "href": "file://test/", + "password": "" + } + } + ], + "host": [ + { + "comment": "Non-special scheme", + "href": "sc://x/", + "new_value": "\u0000", + "expected": { + "href": "sc://x/", + "host": "x", + "hostname": "x" + } + }, + { + "href": "sc://x/", + "new_value": "\u0009", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "\u000A", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "\u000D", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": " ", + "expected": { + "href": "sc://x/", + "host": "x", + "hostname": "x" + } + }, + { + "href": "sc://x/", + "new_value": "#", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "/", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "?", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "@", + "expected": { + "href": "sc://x/", + "host": "x", + "hostname": "x" + } + }, + { + "href": "sc://x/", + "new_value": "ß", + "expected": { + "href": "sc://%C3%9F/", + "host": "%C3%9F", + "hostname": "%C3%9F" + } + }, + { + "comment": "IDNA Nontransitional_Processing", + "href": "https://x/", + "new_value": "ß", + "expected": { + "href": "https://xn--zca/", + "host": "xn--zca", + "hostname": "xn--zca" + } + }, + { + "comment": "Cannot-be-a-base means no host", + "href": "mailto:me@example.net", + "new_value": "example.com", + "expected": { + "href": "mailto:me@example.net", + "host": "" + } + }, + { + "comment": "Cannot-be-a-base means no host", + "href": "data:text/plain,Stuff", + "new_value": "example.net", + "expected": { + "href": "data:text/plain,Stuff", + "host": "" + } + }, + { + "href": "http://example.net", + "new_value": "example.com:8080", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Port number is unchanged if not specified in the new value", + "href": "http://example.net:8080", + "new_value": "example.com", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Port number is unchanged if not specified", + "href": "http://example.net:8080", + "new_value": "example.com:", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "The empty host is not valid for special schemes", + "href": "http://example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "host": "example.net" + } + }, + { + "comment": "The empty host is OK for non-special schemes", + "href": "view-source+http://example.net/foo", + "new_value": "", + "expected": { + "href": "view-source+http:///foo", + "host": "" + } + }, + { + "comment": "Path-only URLs can gain a host", + "href": "a:/foo", + "new_value": "example.net", + "expected": { + "href": "a://example.net/foo", + "host": "example.net" + } + }, + { + "comment": "IPv4 address syntax is normalized", + "href": "http://example.net", + "new_value": "0x7F000001:8080", + "expected": { + "href": "http://127.0.0.1:8080/", + "host": "127.0.0.1:8080", + "hostname": "127.0.0.1", + "port": "8080" + } + }, + { + "comment": "IPv6 address syntax is normalized", + "href": "http://example.net", + "new_value": "[::0:01]:2", + "expected": { + "href": "http://[::1]:2/", + "host": "[::1]:2", + "hostname": "[::1]", + "port": "2" + } + }, + { + "comment": "IPv6 literal address with port, crbug.com/1012416", + "href": "http://example.net", + "new_value": "[2001:db8::2]:4002", + "expected": { + "href": "http://[2001:db8::2]:4002/", + "host": "[2001:db8::2]:4002", + "hostname": "[2001:db8::2]", + "port": "4002" + } + }, + { + "comment": "Default port number is removed", + "href": "http://example.net", + "new_value": "example.com:80", + "expected": { + "href": "http://example.com/", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Default port number is removed", + "href": "https://example.net", + "new_value": "example.com:443", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Default port number is only removed for the relevant scheme", + "href": "https://example.net", + "new_value": "example.com:80", + "expected": { + "href": "https://example.com:80/", + "host": "example.com:80", + "hostname": "example.com", + "port": "80" + } + }, + { + "comment": "Port number is removed if new port is scheme default and existing URL has a non-default port", + "href": "http://example.net:8080", + "new_value": "example.com:80", + "expected": { + "href": "http://example.com/", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com/stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080/stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com?stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080?stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com#stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com:8080#stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "example.com:8080\\stuff", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "\\ is not a delimiter for non-special schemes, but still forbidden in hosts", + "href": "view-source+http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "view-source+http://example.net/path", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "view-source+http://example.net/path", + "new_value": "example.com:8080stuff2", + "expected": { + "href": "view-source+http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "example.com:8080stuff2", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "example.com:8080+2", + "expected": { + "href": "http://example.com:8080/path", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "Port numbers are 16 bit integers", + "href": "http://example.net/path", + "new_value": "example.com:65535", + "expected": { + "href": "http://example.com:65535/path", + "host": "example.com:65535", + "hostname": "example.com", + "port": "65535" + } + }, + { + "comment": "Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though.", + "href": "http://example.net/path", + "new_value": "example.com:65536", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Broken IPv6", + "href": "http://example.net/", + "new_value": "[google.com]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.2.3.4x]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.2.3.]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.2.]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "file://y/", + "new_value": "x:123", + "expected": { + "href": "file://y/", + "host": "y", + "hostname": "y", + "port": "" + } + }, + { + "href": "file://y/", + "new_value": "loc%41lhost", + "expected": { + "href": "file:///", + "host": "", + "hostname": "", + "port": "" + } + }, + { + "href": "file://hi/x", + "new_value": "", + "expected": { + "href": "file:///x", + "host": "", + "hostname": "", + "port": "" + } + }, + { + "href": "sc://test@test/", + "new_value": "", + "expected": { + "href": "sc://test@test/", + "host": "test", + "hostname": "test", + "username": "test" + } + }, + { + "href": "sc://test:12/", + "new_value": "", + "expected": { + "href": "sc://test:12/", + "host": "test:12", + "hostname": "test", + "port": "12" + } + }, + { + "comment": "Leading / is not stripped", + "href": "http://example.com/", + "new_value": "///bad.com", + "expected": { + "href": "http://example.com/", + "host": "example.com", + "hostname": "example.com" + } + }, + { + "comment": "Leading / is not stripped", + "href": "sc://example.com/", + "new_value": "///bad.com", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "https://example.com/", + "new_value": "a%C2%ADb", + "expected": { + "href": "https://ab/", + "host": "ab", + "hostname": "ab" + } + }, + { + "href": "https://example.com/", + "new_value": "\u00AD", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com" + } + }, + { + "href": "https://example.com/", + "new_value": "%C2%AD", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com" + } + }, + { + "href": "https://example.com/", + "new_value": "xn--", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com" + } + } + ], + "hostname": [ + { + "comment": "Non-special scheme", + "href": "sc://x/", + "new_value": "\u0000", + "expected": { + "href": "sc://x/", + "host": "x", + "hostname": "x" + } + }, + { + "href": "sc://x/", + "new_value": "\u0009", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "\u000A", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "\u000D", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": " ", + "expected": { + "href": "sc://x/", + "host": "x", + "hostname": "x" + } + }, + { + "href": "sc://x/", + "new_value": "#", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "/", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "?", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "sc://x/", + "new_value": "@", + "expected": { + "href": "sc://x/", + "host": "x", + "hostname": "x" + } + }, + { + "comment": "Cannot-be-a-base means no host", + "href": "mailto:me@example.net", + "new_value": "example.com", + "expected": { + "href": "mailto:me@example.net", + "host": "" + } + }, + { + "comment": "Cannot-be-a-base means no host", + "href": "data:text/plain,Stuff", + "new_value": "example.net", + "expected": { + "href": "data:text/plain,Stuff", + "host": "" + } + }, + { + "href": "http://example.net:8080", + "new_value": "example.com", + "expected": { + "href": "http://example.com:8080/", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080" + } + }, + { + "comment": "The empty host is not valid for special schemes", + "href": "http://example.net", + "new_value": "", + "expected": { + "href": "http://example.net/", + "host": "example.net" + } + }, + { + "comment": "The empty host is OK for non-special schemes", + "href": "view-source+http://example.net/foo", + "new_value": "", + "expected": { + "href": "view-source+http:///foo", + "host": "" + } + }, + { + "comment": "Path-only URLs can gain a host", + "href": "a:/foo", + "new_value": "example.net", + "expected": { + "href": "a://example.net/foo", + "host": "example.net" + } + }, + { + "comment": "IPv4 address syntax is normalized", + "href": "http://example.net:8080", + "new_value": "0x7F000001", + "expected": { + "href": "http://127.0.0.1:8080/", + "host": "127.0.0.1:8080", + "hostname": "127.0.0.1", + "port": "8080" + } + }, + { + "comment": "IPv6 address syntax is normalized", + "href": "http://example.net", + "new_value": "[::0:01]", + "expected": { + "href": "http://[::1]/", + "host": "[::1]", + "hostname": "[::1]", + "port": "" + } + }, + { + "comment": ": delimiter invalidates entire value", + "href": "http://example.net/path", + "new_value": "example.com:8080", + "expected": { + "href": "http://example.net/path", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": ": delimiter invalidates entire value", + "href": "http://example.net:8080/path", + "new_value": "example.com:", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com/stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com?stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "example.com#stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "http://example.com/path", + "host": "example.com", + "hostname": "example.com", + "port": "" + } + }, + { + "comment": "\\ is not a delimiter for non-special schemes, but still forbidden in hosts", + "href": "view-source+http://example.net/path", + "new_value": "example.com\\stuff", + "expected": { + "href": "view-source+http://example.net/path", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Broken IPv6", + "href": "http://example.net/", + "new_value": "[google.com]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.2.3.4x]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.2.3.]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.2.]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "http://example.net/", + "new_value": "[::1.]", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net" + } + }, + { + "href": "file://y/", + "new_value": "x:123", + "expected": { + "href": "file://y/", + "host": "y", + "hostname": "y", + "port": "" + } + }, + { + "href": "file://y/", + "new_value": "loc%41lhost", + "expected": { + "href": "file:///", + "host": "", + "hostname": "", + "port": "" + } + }, + { + "href": "file://hi/x", + "new_value": "", + "expected": { + "href": "file:///x", + "host": "", + "hostname": "", + "port": "" + } + }, + { + "href": "sc://test@test/", + "new_value": "", + "expected": { + "href": "sc://test@test/", + "host": "test", + "hostname": "test", + "username": "test" + } + }, + { + "href": "sc://test:12/", + "new_value": "", + "expected": { + "href": "sc://test:12/", + "host": "test:12", + "hostname": "test", + "port": "12" + } + }, + { + "comment": "Drop /. from path", + "href": "non-spec:/.//p", + "new_value": "h", + "expected": { + "href": "non-spec://h//p", + "host": "h", + "hostname": "h", + "pathname": "//p" + } + }, + { + "href": "non-spec:/.//p", + "new_value": "", + "expected": { + "href": "non-spec:////p", + "host": "", + "hostname": "", + "pathname": "//p" + } + }, + { + "comment": "Leading / is not stripped", + "href": "http://example.com/", + "new_value": "///bad.com", + "expected": { + "href": "http://example.com/", + "host": "example.com", + "hostname": "example.com" + } + }, + { + "comment": "Leading / is not stripped", + "href": "sc://example.com/", + "new_value": "///bad.com", + "expected": { + "href": "sc:///", + "host": "", + "hostname": "" + } + }, + { + "href": "https://example.com/", + "new_value": "a%C2%ADb", + "expected": { + "href": "https://ab/", + "host": "ab", + "hostname": "ab" + } + }, + { + "href": "https://example.com/", + "new_value": "\u00AD", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com" + } + }, + { + "href": "https://example.com/", + "new_value": "%C2%AD", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com" + } + }, + { + "href": "https://example.com/", + "new_value": "xn--", + "expected": { + "href": "https://example.com/", + "host": "example.com", + "hostname": "example.com" + } + } + ], + "port": [ + { + "href": "http://example.net", + "new_value": "8080", + "expected": { + "href": "http://example.net:8080/", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Port number is removed if empty is the new value", + "href": "http://example.net:8080", + "new_value": "", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Default port number is removed", + "href": "http://example.net:8080", + "new_value": "80", + "expected": { + "href": "http://example.net/", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Default port number is removed", + "href": "https://example.net:4433", + "new_value": "443", + "expected": { + "href": "https://example.net/", + "host": "example.net", + "hostname": "example.net", + "port": "" + } + }, + { + "comment": "Default port number is only removed for the relevant scheme", + "href": "https://example.net", + "new_value": "80", + "expected": { + "href": "https://example.net:80/", + "host": "example.net:80", + "hostname": "example.net", + "port": "80" + } + }, + { + "comment": "Stuff after a / delimiter is ignored", + "href": "http://example.net/path", + "new_value": "8080/stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a ? delimiter is ignored", + "href": "http://example.net/path", + "new_value": "8080?stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a # delimiter is ignored", + "href": "http://example.net/path", + "new_value": "8080#stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Stuff after a \\ delimiter is ignored for special schemes", + "href": "http://example.net/path", + "new_value": "8080\\stuff", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "view-source+http://example.net/path", + "new_value": "8080stuff2", + "expected": { + "href": "view-source+http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "8080stuff2", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error", + "href": "http://example.net/path", + "new_value": "8080+2", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Port numbers are 16 bit integers", + "href": "http://example.net/path", + "new_value": "65535", + "expected": { + "href": "http://example.net:65535/path", + "host": "example.net:65535", + "hostname": "example.net", + "port": "65535" + } + }, + { + "comment": "Port numbers are 16 bit integers, overflowing is an error", + "href": "http://example.net:8080/path", + "new_value": "65536", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Setting port to a string that doesn't parse as a number", + "href": "http://example.net:8080/path", + "new_value": "randomstring", + "expected": { + "href": "http://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "comment": "Port numbers are 16 bit integers, overflowing is an error", + "href": "non-special://example.net:8080/path", + "new_value": "65536", + "expected": { + "href": "non-special://example.net:8080/path", + "host": "example.net:8080", + "hostname": "example.net", + "port": "8080" + } + }, + { + "href": "file://test/", + "new_value": "12", + "expected": { + "href": "file://test/", + "port": "" + } + }, + { + "href": "file://localhost/", + "new_value": "12", + "expected": { + "href": "file:///", + "port": "" + } + }, + { + "href": "non-base:value", + "new_value": "12", + "expected": { + "href": "non-base:value", + "port": "" + } + }, + { + "href": "sc:///", + "new_value": "12", + "expected": { + "href": "sc:///", + "port": "" + } + }, + { + "href": "sc://x/", + "new_value": "12", + "expected": { + "href": "sc://x:12/", + "port": "12" + } + }, + { + "href": "javascript://x/", + "new_value": "12", + "expected": { + "href": "javascript://x:12/", + "port": "12" + } + }, + { + "comment": "Leading u0009 on special scheme", + "href": "https://domain.com:443", + "new_value": "\u00098080", + "expected": { + "port": "8080" + } + }, + { + "comment": "Leading u0009 on non-special scheme", + "href": "wpt++://domain.com:443", + "new_value": "\u00098080", + "expected": { + "port": "8080" + } + }, + { + "comment": "Should use all ascii prefixed characters as port", + "href": "https://www.google.com:4343", + "new_value": "4wpt", + "expected": { + "port": "4" + } + } + ], + "pathname": [ + { + "comment": "Opaque paths cannot be set", + "href": "mailto:me@example.net", + "new_value": "/foo", + "expected": { + "href": "mailto:me@example.net", + "pathname": "me@example.net" + } + }, + { + "href": "data:original", + "new_value": "new value", + "expected": { + "href": "data:original", + "pathname": "original" + } + }, + { + "href": "sc:original", + "new_value": "new value", + "expected": { + "href": "sc:original", + "pathname": "original" + } + }, + { + "comment": "Special URLs cannot have their paths erased", + "href": "file:///some/path", + "new_value": "", + "expected": { + "href": "file:///", + "pathname": "/" + } + }, + { + "comment": "Non-special URLs can have their paths erased", + "href": "foo://somehost/some/path", + "new_value": "", + "expected": { + "href": "foo://somehost", + "pathname": "" + } + }, + { + "comment": "Non-special URLs with an empty host can have their paths erased", + "href": "foo:///some/path", + "new_value": "", + "expected": { + "href": "foo://", + "pathname": "" + } + }, + { + "comment": "Path-only URLs cannot have their paths erased", + "href": "foo:/some/path", + "new_value": "", + "expected": { + "href": "foo:/", + "pathname": "/" + } + }, + { + "comment": "Path-only URLs always have an initial slash", + "href": "foo:/some/path", + "new_value": "test", + "expected": { + "href": "foo:/test", + "pathname": "/test" + } + }, + { + "href": "unix:/run/foo.socket?timeout=10", + "new_value": "/var/log/../run/bar.socket", + "expected": { + "href": "unix:/var/run/bar.socket?timeout=10", + "pathname": "/var/run/bar.socket" + } + }, + { + "href": "https://example.net#nav", + "new_value": "home", + "expected": { + "href": "https://example.net/home#nav", + "pathname": "/home" + } + }, + { + "href": "https://example.net#nav", + "new_value": "../home", + "expected": { + "href": "https://example.net/home#nav", + "pathname": "/home" + } + }, + { + "comment": "\\ is a segment delimiter for 'special' URLs", + "href": "http://example.net/home?lang=fr#nav", + "new_value": "\\a\\%2E\\b\\%2e.\\c", + "expected": { + "href": "http://example.net/a/c?lang=fr#nav", + "pathname": "/a/c" + } + }, + { + "comment": "\\ is *not* a segment delimiter for non-'special' URLs", + "href": "view-source+http://example.net/home?lang=fr#nav", + "new_value": "\\a\\%2E\\b\\%2e.\\c", + "expected": { + "href": "view-source+http://example.net/\\a\\%2E\\b\\%2e.\\c?lang=fr#nav", + "pathname": "/\\a\\%2E\\b\\%2e.\\c" + } + }, + { + "comment": "UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.", + "href": "a:/", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "a:/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9", + "pathname": "/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is, including %2E outside dotted segments.", + "href": "http://example.net", + "new_value": "%2e%2E%c3%89té", + "expected": { + "href": "http://example.net/%2e%2E%c3%89t%C3%A9", + "pathname": "/%2e%2E%c3%89t%C3%A9" + } + }, + { + "comment": "? needs to be encoded", + "href": "http://example.net", + "new_value": "?", + "expected": { + "href": "http://example.net/%3F", + "pathname": "/%3F" + } + }, + { + "comment": "# needs to be encoded", + "href": "http://example.net", + "new_value": "#", + "expected": { + "href": "http://example.net/%23", + "pathname": "/%23" + } + }, + { + "comment": "? needs to be encoded, non-special scheme", + "href": "sc://example.net", + "new_value": "?", + "expected": { + "href": "sc://example.net/%3F", + "pathname": "/%3F" + } + }, + { + "comment": "# needs to be encoded, non-special scheme", + "href": "sc://example.net", + "new_value": "#", + "expected": { + "href": "sc://example.net/%23", + "pathname": "/%23" + } + }, + { + "comment": "? doesn't mess up encoding", + "href": "http://example.net", + "new_value": "/?é", + "expected": { + "href": "http://example.net/%3F%C3%A9", + "pathname": "/%3F%C3%A9" + } + }, + { + "comment": "# doesn't mess up encoding", + "href": "http://example.net", + "new_value": "/#é", + "expected": { + "href": "http://example.net/%23%C3%A9", + "pathname": "/%23%C3%A9" + } + }, + { + "comment": "File URLs and (back)slashes", + "href": "file://monkey/", + "new_value": "\\\\", + "expected": { + "href": "file://monkey//", + "pathname": "//" + } + }, + { + "comment": "File URLs and (back)slashes", + "href": "file:///unicorn", + "new_value": "//\\/", + "expected": { + "href": "file://////", + "pathname": "////" + } + }, + { + "comment": "File URLs and (back)slashes", + "href": "file:///unicorn", + "new_value": "//monkey/..//", + "expected": { + "href": "file://///", + "pathname": "///" + } + }, + { + "comment": "Serialize /. in path", + "href": "non-spec:/", + "new_value": "/.//p", + "expected": { + "href": "non-spec:/.//p", + "pathname": "//p" + } + }, + { + "href": "non-spec:/", + "new_value": "/..//p", + "expected": { + "href": "non-spec:/.//p", + "pathname": "//p" + } + }, + { + "href": "non-spec:/", + "new_value": "//p", + "expected": { + "href": "non-spec:/.//p", + "pathname": "//p" + } + }, + { + "comment": "Drop /. from path", + "href": "non-spec:/.//", + "new_value": "p", + "expected": { + "href": "non-spec:/p", + "pathname": "/p" + } + }, + { + "comment": "Non-special URLs with non-opaque paths percent-encode U+0020", + "href": "data:/nospace", + "new_value": "space ", + "expected": { + "href": "data:/space%20", + "pathname": "/space%20" + } + }, + { + "href": "sc:/nospace", + "new_value": "space ", + "expected": { + "href": "sc:/space%20", + "pathname": "/space%20" + } + }, + { + "comment": "Trailing space should be encoded", + "href": "http://example.net", + "new_value": " ", + "expected": { + "href": "http://example.net/%20", + "pathname": "/%20" + } + }, + { + "comment": "Trailing C0 control should be encoded", + "href": "http://example.net", + "new_value": "\u0000", + "expected": { + "href": "http://example.net/%00", + "pathname": "/%00" + } + } + ], + "search": [ + { + "href": "https://example.net#nav", + "new_value": "lang=fr", + "expected": { + "href": "https://example.net/?lang=fr#nav", + "search": "?lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "lang=fr", + "expected": { + "href": "https://example.net/?lang=fr#nav", + "search": "?lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "?lang=fr", + "expected": { + "href": "https://example.net/?lang=fr#nav", + "search": "?lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "??lang=fr", + "expected": { + "href": "https://example.net/??lang=fr#nav", + "search": "??lang=fr" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "?", + "expected": { + "href": "https://example.net/?#nav", + "search": "" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "", + "expected": { + "href": "https://example.net/#nav", + "search": "" + } + }, + { + "href": "https://example.net?lang=en-US", + "new_value": "", + "expected": { + "href": "https://example.net/", + "search": "" + } + }, + { + "href": "https://example.net", + "new_value": "", + "expected": { + "href": "https://example.net/", + "search": "" + } + }, + { + "comment": "UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.", + "href": "a:/", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "a:/?%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9", + "search": "?%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://example.net/?%c3%89t%C3%A9", + "search": "?%c3%89t%C3%A9" + } + }, + { + "comment": "Drop trailing spaces from trailing opaque paths", + "href": "data:space ?query", + "new_value": "", + "expected": { + "href": "data:space", + "pathname": "space", + "search": "" + } + }, + { + "href": "sc:space ?query", + "new_value": "", + "expected": { + "href": "sc:space", + "pathname": "space", + "search": "" + } + }, + { + "comment": "Do not drop trailing spaces from non-trailing opaque paths", + "href": "data:space ?query#fragment", + "new_value": "", + "expected": { + "href": "data:space #fragment", + "search": "" + } + }, + { + "href": "sc:space ?query#fragment", + "new_value": "", + "expected": { + "href": "sc:space #fragment", + "search": "" + } + }, + { + "comment": "Trailing space should be encoded", + "href": "http://example.net", + "new_value": " ", + "expected": { + "href": "http://example.net/?%20", + "search": "?%20" + } + }, + { + "comment": "Trailing C0 control should be encoded", + "href": "http://example.net", + "new_value": "\u0000", + "expected": { + "href": "http://example.net/?%00", + "search": "?%00" + } + } + ], + "hash": [ + { + "href": "https://example.net", + "new_value": "main", + "expected": { + "href": "https://example.net/#main", + "hash": "#main" + } + }, + { + "href": "https://example.net#nav", + "new_value": "main", + "expected": { + "href": "https://example.net/#main", + "hash": "#main" + } + }, + { + "href": "https://example.net?lang=en-US", + "new_value": "##nav", + "expected": { + "href": "https://example.net/?lang=en-US##nav", + "hash": "##nav" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "#main", + "expected": { + "href": "https://example.net/?lang=en-US#main", + "hash": "#main" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "#", + "expected": { + "href": "https://example.net/?lang=en-US#", + "hash": "" + } + }, + { + "href": "https://example.net?lang=en-US#nav", + "new_value": "", + "expected": { + "href": "https://example.net/?lang=en-US", + "hash": "" + } + }, + { + "href": "http://example.net", + "new_value": "#foo bar", + "expected": { + "href": "http://example.net/#foo%20bar", + "hash": "#foo%20bar" + } + }, + { + "href": "http://example.net", + "new_value": "#foo\"bar", + "expected": { + "href": "http://example.net/#foo%22bar", + "hash": "#foo%22bar" + } + }, + { + "href": "http://example.net", + "new_value": "#foo<bar", + "expected": { + "href": "http://example.net/#foo%3Cbar", + "hash": "#foo%3Cbar" + } + }, + { + "href": "http://example.net", + "new_value": "#foo>bar", + "expected": { + "href": "http://example.net/#foo%3Ebar", + "hash": "#foo%3Ebar" + } + }, + { + "href": "http://example.net", + "new_value": "#foo`bar", + "expected": { + "href": "http://example.net/#foo%60bar", + "hash": "#foo%60bar" + } + }, + { + "comment": "Simple percent-encoding; tabs and newlines are removed", + "href": "a:/", + "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé", + "expected": { + "href": "a:/#%00%01%1F%20!%22#$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_%60az{|}~%7F%C2%80%C2%81%C3%89%C3%A9", + "hash": "#%00%01%1F%20!%22#$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_%60az{|}~%7F%C2%80%C2%81%C3%89%C3%A9" + } + }, + { + "comment": "Percent-encode NULLs in fragment", + "href": "http://example.net", + "new_value": "a\u0000b", + "expected": { + "href": "http://example.net/#a%00b", + "hash": "#a%00b" + } + }, + { + "comment": "Percent-encode NULLs in fragment", + "href": "non-spec:/", + "new_value": "a\u0000b", + "expected": { + "href": "non-spec:/#a%00b", + "hash": "#a%00b" + } + }, + { + "comment": "Bytes already percent-encoded are left as-is", + "href": "http://example.net", + "new_value": "%c3%89té", + "expected": { + "href": "http://example.net/#%c3%89t%C3%A9", + "hash": "#%c3%89t%C3%A9" + } + }, + { + "href": "javascript:alert(1)", + "new_value": "castle", + "expected": { + "href": "javascript:alert(1)#castle", + "hash": "#castle" + } + }, + { + "comment": "Drop trailing spaces from trailing opaque paths", + "href": "data:space #fragment", + "new_value": "", + "expected": { + "href": "data:space", + "pathname": "space", + "hash": "" + } + }, + { + "href": "sc:space #fragment", + "new_value": "", + "expected": { + "href": "sc:space", + "pathname": "space", + "hash": "" + } + }, + { + "comment": "Do not drop trailing spaces from non-trailing opaque paths", + "href": "data:space ?query#fragment", + "new_value": "", + "expected": { + "href": "data:space ?query", + "hash": "" + } + }, + { + "href": "sc:space ?query#fragment", + "new_value": "", + "expected": { + "href": "sc:space ?query", + "hash": "" + } + }, + { + "comment": "Trailing space should be encoded", + "href": "http://example.net", + "new_value": " ", + "expected": { + "href": "http://example.net/#%20", + "hash": "#%20" + } + }, + { + "comment": "Trailing C0 control should be encoded", + "href": "http://example.net", + "new_value": "\u0000", + "expected": { + "href": "http://example.net/#%00", + "hash": "#%00" + } + } + ], + "href": [ + { + "href": "file:///var/log/system.log", + "new_value": "http://0300.168.0xF0", + "expected": { + "href": "http://192.168.0.240/", + "protocol": "http:" + } + } + ] +} 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" + } +] diff --git a/testing/web-platform/tests/url/resources/urltestdata.json b/testing/web-platform/tests/url/resources/urltestdata.json new file mode 100644 index 0000000000..69767a20db --- /dev/null +++ b/testing/web-platform/tests/url/resources/urltestdata.json @@ -0,0 +1,9688 @@ +[ + "See ../README.md for a description of the format.", + { + "input": "http://example\t.\norg", + "base": "http://example.org/foo/bar", + "href": "http://example.org/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://user:pass@foo:21/bar;par?b#c", + "base": "http://example.org/foo/bar", + "href": "http://user:pass@foo:21/bar;par?b#c", + "origin": "http://foo:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "foo:21", + "hostname": "foo", + "port": "21", + "pathname": "/bar;par", + "search": "?b", + "hash": "#c" + }, + { + "input": "https://test:@test", + "base": null, + "href": "https://test@test/", + "origin": "https://test", + "protocol": "https:", + "username": "test", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://:@test", + "base": null, + "href": "https://test/", + "origin": "https://test", + "protocol": "https:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "non-special://test:@test/x", + "base": null, + "href": "non-special://test@test/x", + "origin": "null", + "protocol": "non-special:", + "username": "test", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/x", + "search": "", + "hash": "" + }, + { + "input": "non-special://:@test/x", + "base": null, + "href": "non-special://test/x", + "origin": "null", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/x", + "search": "", + "hash": "" + }, + { + "input": "http:foo.com", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/foo.com", + "search": "", + "hash": "" + }, + { + "input": "\t :foo.com \n", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com", + "search": "", + "hash": "" + }, + { + "input": " foo.com ", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/foo.com", + "search": "", + "hash": "" + }, + { + "input": "a:\t foo.com", + "base": "http://example.org/foo/bar", + "href": "a: foo.com", + "origin": "null", + "protocol": "a:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": " foo.com", + "search": "", + "hash": "" + }, + { + "input": "http://f:21/ b ? d # e ", + "base": "http://example.org/foo/bar", + "href": "http://f:21/%20b%20?%20d%20#%20e", + "origin": "http://f:21", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:21", + "hostname": "f", + "port": "21", + "pathname": "/%20b%20", + "search": "?%20d%20", + "hash": "#%20e" + }, + { + "input": "lolscheme:x x#x x", + "base": null, + "href": "lolscheme:x x#x%20x", + "protocol": "lolscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "x x", + "search": "", + "hash": "#x%20x" + }, + { + "input": "http://f:/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:0/c", + "base": "http://example.org/foo/bar", + "href": "http://f:0/c", + "origin": "http://f:0", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:0", + "hostname": "f", + "port": "0", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:00000000000000/c", + "base": "http://example.org/foo/bar", + "href": "http://f:0/c", + "origin": "http://f:0", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:0", + "hostname": "f", + "port": "0", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:00000000000000000000080/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:b/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f: /c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f:\n/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:fifty-two/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f:999999/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "non-special://f:999999/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f: 21 / b ? d # e ", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": " \t", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": ":foo.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com/", + "search": "", + "hash": "" + }, + { + "input": ":foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com/", + "search": "", + "hash": "" + }, + { + "input": ":", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:", + "search": "", + "hash": "" + }, + { + "input": ":a", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:a", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:a", + "search": "", + "hash": "" + }, + { + "input": ":/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:/", + "search": "", + "hash": "" + }, + { + "input": ":\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:/", + "search": "", + "hash": "" + }, + { + "input": ":#", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:#", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:", + "search": "", + "hash": "" + }, + { + "input": "#", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "#/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#/" + }, + { + "input": "#\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#\\", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#\\" + }, + { + "input": "#;?", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#;?", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#;?" + }, + { + "input": "?", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar?", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": ":23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:23", + "search": "", + "hash": "" + }, + { + "input": "/:23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/:23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/:23", + "search": "", + "hash": "" + }, + { + "input": "\\x", + "base": "http://example.org/foo/bar", + "href": "http://example.org/x", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/x", + "search": "", + "hash": "" + }, + { + "input": "\\\\x\\hello", + "base": "http://example.org/foo/bar", + "href": "http://x/hello", + "origin": "http://x", + "protocol": "http:", + "username": "", + "password": "", + "host": "x", + "hostname": "x", + "port": "", + "pathname": "/hello", + "search": "", + "hash": "" + }, + { + "input": "::", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/::", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/::", + "search": "", + "hash": "" + }, + { + "input": "::23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/::23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/::23", + "search": "", + "hash": "" + }, + { + "input": "foo://", + "base": "http://example.org/foo/bar", + "href": "foo://", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "http://a:b@c:29/d", + "base": "http://example.org/foo/bar", + "href": "http://a:b@c:29/d", + "origin": "http://c:29", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "c:29", + "hostname": "c", + "port": "29", + "pathname": "/d", + "search": "", + "hash": "" + }, + { + "input": "http::@c:29", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:@c:29", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:@c:29", + "search": "", + "hash": "" + }, + { + "input": "http://&a:foo(b]c@d:2/", + "base": "http://example.org/foo/bar", + "href": "http://&a:foo(b%5Dc@d:2/", + "origin": "http://d:2", + "protocol": "http:", + "username": "&a", + "password": "foo(b%5Dc", + "host": "d:2", + "hostname": "d", + "port": "2", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://::@c@d:2", + "base": "http://example.org/foo/bar", + "href": "http://:%3A%40c@d:2/", + "origin": "http://d:2", + "protocol": "http:", + "username": "", + "password": "%3A%40c", + "host": "d:2", + "hostname": "d", + "port": "2", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo.com:b@d/", + "base": "http://example.org/foo/bar", + "href": "http://foo.com:b@d/", + "origin": "http://d", + "protocol": "http:", + "username": "foo.com", + "password": "b", + "host": "d", + "hostname": "d", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo.com/\\@", + "base": "http://example.org/foo/bar", + "href": "http://foo.com//@", + "origin": "http://foo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.com", + "hostname": "foo.com", + "port": "", + "pathname": "//@", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://foo.com/", + "origin": "http://foo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.com", + "hostname": "foo.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\a\\b:c\\d@foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://a/b:c/d@foo.com/", + "origin": "http://a", + "protocol": "http:", + "username": "", + "password": "", + "host": "a", + "hostname": "a", + "port": "", + "pathname": "/b:c/d@foo.com/", + "search": "", + "hash": "" + }, + { + "input": "foo:/", + "base": "http://example.org/foo/bar", + "href": "foo:/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "foo:/bar.com/", + "base": "http://example.org/foo/bar", + "href": "foo:/bar.com/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/bar.com/", + "search": "", + "hash": "" + }, + { + "input": "foo://///////", + "base": "http://example.org/foo/bar", + "href": "foo://///////", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///////", + "search": "", + "hash": "" + }, + { + "input": "foo://///////bar.com/", + "base": "http://example.org/foo/bar", + "href": "foo://///////bar.com/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///////bar.com/", + "search": "", + "hash": "" + }, + { + "input": "foo:////://///", + "base": "http://example.org/foo/bar", + "href": "foo:////://///", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//://///", + "search": "", + "hash": "" + }, + { + "input": "c:/foo", + "base": "http://example.org/foo/bar", + "href": "c:/foo", + "origin": "null", + "protocol": "c:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "//foo/bar", + "base": "http://example.org/foo/bar", + "href": "http://foo/bar", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/bar", + "search": "", + "hash": "" + }, + { + "input": "http://foo/path;a??e#f#g", + "base": "http://example.org/foo/bar", + "href": "http://foo/path;a??e#f#g", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/path;a", + "search": "??e", + "hash": "#f#g" + }, + { + "input": "http://foo/abcd?efgh?ijkl", + "base": "http://example.org/foo/bar", + "href": "http://foo/abcd?efgh?ijkl", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/abcd", + "search": "?efgh?ijkl", + "hash": "" + }, + { + "input": "http://foo/abcd#foo?bar", + "base": "http://example.org/foo/bar", + "href": "http://foo/abcd#foo?bar", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/abcd", + "search": "", + "hash": "#foo?bar" + }, + { + "input": "[61:24:74]:98", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/[61:24:74]:98", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/[61:24:74]:98", + "search": "", + "hash": "" + }, + { + "input": "http:[61:27]/:foo", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/[61:27]/:foo", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/[61:27]/:foo", + "search": "", + "hash": "" + }, + { + "input": "http://[1::2]:3:4", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1]", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1]:80", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://[2001::1]", + "base": "http://example.org/foo/bar", + "href": "http://[2001::1]/", + "origin": "http://[2001::1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[2001::1]", + "hostname": "[2001::1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[::127.0.0.1]", + "base": "http://example.org/foo/bar", + "href": "http://[::7f00:1]/", + "origin": "http://[::7f00:1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[::7f00:1]", + "hostname": "[::7f00:1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[::127.0.0.1.]", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://[0:0:0:0:0:0:13.1.68.3]", + "base": "http://example.org/foo/bar", + "href": "http://[::d01:4403]/", + "origin": "http://[::d01:4403]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[::d01:4403]", + "hostname": "[::d01:4403]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[2001::1]:80", + "base": "http://example.org/foo/bar", + "href": "http://[2001::1]/", + "origin": "http://[2001::1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[2001::1]", + "hostname": "[2001::1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/example.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/example.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftp:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:/example.com/", + "base": "http://example.org/foo/bar", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:/example.com/", + "base": "http://example.org/foo/bar", + "href": "madeupscheme:/example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file:/example.com/", + "base": "http://example.org/foo/bar", + "href": "file:///example.com/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file://example:1/", + "base": null, + "failure": true + }, + { + "input": "file://example:test/", + "base": null, + "failure": true + }, + { + "input": "file://example%/", + "base": null, + "failure": true + }, + { + "input": "file://[example]/", + "base": null, + "failure": true + }, + { + "input": "ftps:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ftps:/example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:/example.com/", + "base": "http://example.org/foo/bar", + "href": "gopher:/example.com/", + "origin": "null", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ws:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:/example.com/", + "base": "http://example.org/foo/bar", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/example.com/", + "base": "http://example.org/foo/bar", + "href": "data:/example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/example.com/", + "base": "http://example.org/foo/bar", + "href": "javascript:/example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/example.com/", + "base": "http://example.org/foo/bar", + "href": "mailto:/example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "http:example.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/example.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftp:example.com/", + "base": "http://example.org/foo/bar", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:example.com/", + "base": "http://example.org/foo/bar", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:example.com/", + "base": "http://example.org/foo/bar", + "href": "madeupscheme:example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:example.com/", + "base": "http://example.org/foo/bar", + "href": "ftps:example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:example.com/", + "base": "http://example.org/foo/bar", + "href": "gopher:example.com/", + "origin": "null", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ws:example.com/", + "base": "http://example.org/foo/bar", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:example.com/", + "base": "http://example.org/foo/bar", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:example.com/", + "base": "http://example.org/foo/bar", + "href": "data:example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:example.com/", + "base": "http://example.org/foo/bar", + "href": "javascript:example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:example.com/", + "base": "http://example.org/foo/bar", + "href": "mailto:example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "/a/b/c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/b/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/b/c", + "search": "", + "hash": "" + }, + { + "input": "/a/ /c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/%20/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/%20/c", + "search": "", + "hash": "" + }, + { + "input": "/a%2fc", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a%2fc", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a%2fc", + "search": "", + "hash": "" + }, + { + "input": "/a/%2f/c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/%2f/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/%2f/c", + "search": "", + "hash": "" + }, + { + "input": "#β", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#%CE%B2", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#%CE%B2" + }, + { + "input": "data:text/html,test#test", + "base": "http://example.org/foo/bar", + "href": "data:text/html,test#test", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "text/html,test", + "search": "", + "hash": "#test" + }, + { + "input": "tel:1234567890", + "base": "http://example.org/foo/bar", + "href": "tel:1234567890", + "origin": "null", + "protocol": "tel:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "1234567890", + "search": "", + "hash": "" + }, + "# Based on https://felixfbecker.github.io/whatwg-url-custom-host-repro/", + { + "input": "ssh://example.com/foo/bar.git", + "base": "http://example.org/", + "href": "ssh://example.com/foo/bar.git", + "origin": "null", + "protocol": "ssh:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/bar.git", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html", + { + "input": "file:c:\\foo\\bar.html", + "base": "file:///tmp/mock/path", + "href": "file:///c:/foo/bar.html", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar.html", + "search": "", + "hash": "" + }, + { + "input": " File:c|////foo\\bar.html", + "base": "file:///tmp/mock/path", + "href": "file:///c:////foo/bar.html", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:////foo/bar.html", + "search": "", + "hash": "" + }, + { + "input": "C|/foo/bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/C|\\foo\\bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "//C|/foo/bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "//server/file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "\\\\server\\file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "/\\server/file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "file:///foo/bar.txt", + "base": "file:///tmp/mock/path", + "href": "file:///foo/bar.txt", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/foo/bar.txt", + "search": "", + "hash": "" + }, + { + "input": "file:///home/me", + "base": "file:///tmp/mock/path", + "href": "file:///home/me", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/home/me", + "search": "", + "hash": "" + }, + { + "input": "//", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///test", + "base": "file:///tmp/mock/path", + "href": "file:///test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "file://test", + "base": "file:///tmp/mock/path", + "href": "file://test/", + "protocol": "file:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost/", + "base": "file:///tmp/mock/path", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost/test", + "base": "file:///tmp/mock/path", + "href": "file:///test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "test", + "base": "file:///tmp/mock/path", + "href": "file:///tmp/mock/test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/tmp/mock/test", + "search": "", + "hash": "" + }, + { + "input": "file:test", + "base": "file:///tmp/mock/path", + "href": "file:///tmp/mock/test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/tmp/mock/test", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js", + { + "input": "http://example.com/././foo", + "base": null, + "href": "http://example.com/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/./.foo", + "base": null, + "href": "http://example.com/.foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/.foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/.", + "base": null, + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/./", + "base": null, + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/..", + "base": null, + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../", + "base": null, + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/..bar", + "base": null, + "href": "http://example.com/foo/..bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/..bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../ton", + "base": null, + "href": "http://example.com/foo/ton", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/ton", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../ton/../../a", + "base": null, + "href": "http://example.com/a", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/../../..", + "base": null, + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/../../../ton", + "base": null, + "href": "http://example.com/ton", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/ton", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e", + "base": null, + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e%2", + "base": null, + "href": "http://example.com/foo/%2e%2", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/%2e%2", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar", + "base": null, + "href": "http://example.com/%2e.bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%2e.bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com////../..", + "base": null, + "href": "http://example.com//", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar//../..", + "base": null, + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar//..", + "base": null, + "href": "http://example.com/foo/bar/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/bar/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo", + "base": null, + "href": "http://example.com/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%20foo", + "base": null, + "href": "http://example.com/%20foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%20foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%", + "base": null, + "href": "http://example.com/foo%", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2", + "base": null, + "href": "http://example.com/foo%2", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2zbar", + "base": null, + "href": "http://example.com/foo%2zbar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2zbar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2©zbar", + "base": null, + "href": "http://example.com/foo%2%C3%82%C2%A9zbar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2%C3%82%C2%A9zbar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%41%7a", + "base": null, + "href": "http://example.com/foo%41%7a", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%41%7a", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo\t\u0091%91", + "base": null, + "href": "http://example.com/foo%C2%91%91", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%C2%91%91", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%00%51", + "base": null, + "href": "http://example.com/foo%00%51", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%00%51", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/(%28:%3A%29)", + "base": null, + "href": "http://example.com/(%28:%3A%29)", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/(%28:%3A%29)", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%3A%3a%3C%3c", + "base": null, + "href": "http://example.com/%3A%3a%3C%3c", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%3A%3a%3C%3c", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo\tbar", + "base": null, + "href": "http://example.com/foobar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foobar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com\\\\foo\\\\bar", + "base": null, + "href": "http://example.com//foo//bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "//foo//bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", + "base": null, + "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/@asdf%40", + "base": null, + "href": "http://example.com/@asdf%40", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/@asdf%40", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/你好你好", + "base": null, + "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/‥/foo", + "base": null, + "href": "http://example.com/%E2%80%A5/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E2%80%A5/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com//foo", + "base": null, + "href": "http://example.com/%EF%BB%BF/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%EF%BB%BF/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com//foo//bar", + "base": null, + "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js", + { + "input": "http://www.google.com/foo?bar=baz#", + "base": null, + "href": "http://www.google.com/foo?bar=baz#", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "?bar=baz", + "hash": "" + }, + { + "input": "http://www.google.com/foo?bar=baz# »", + "base": null, + "href": "http://www.google.com/foo?bar=baz#%20%C2%BB", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "?bar=baz", + "hash": "#%20%C2%BB" + }, + { + "input": "data:test# »", + "base": null, + "href": "data:test#%20%C2%BB", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "", + "hash": "#%20%C2%BB" + }, + { + "input": "http://www.google.com", + "base": null, + "href": "http://www.google.com/", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.0x00A80001", + "base": null, + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://www/foo%2Ehtml", + "base": null, + "href": "http://www/foo%2Ehtml", + "origin": "http://www", + "protocol": "http:", + "username": "", + "password": "", + "host": "www", + "hostname": "www", + "port": "", + "pathname": "/foo%2Ehtml", + "search": "", + "hash": "" + }, + { + "input": "http://www/foo/%2E/html", + "base": null, + "href": "http://www/foo/html", + "origin": "http://www", + "protocol": "http:", + "username": "", + "password": "", + "host": "www", + "hostname": "www", + "port": "", + "pathname": "/foo/html", + "search": "", + "hash": "" + }, + { + "input": "http://user:pass@/", + "base": null, + "failure": true + }, + { + "input": "http://%25DOMAIN:foobar@foodomain.com/", + "base": null, + "href": "http://%25DOMAIN:foobar@foodomain.com/", + "origin": "http://foodomain.com", + "protocol": "http:", + "username": "%25DOMAIN", + "password": "foobar", + "host": "foodomain.com", + "hostname": "foodomain.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\www.google.com\\foo", + "base": null, + "href": "http://www.google.com/foo", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://foo:80/", + "base": null, + "href": "http://foo/", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo:81/", + "base": null, + "href": "http://foo:81/", + "origin": "http://foo:81", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "httpa://foo:80/", + "base": null, + "href": "httpa://foo:80/", + "origin": "null", + "protocol": "httpa:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo:-80/", + "base": null, + "failure": true + }, + { + "input": "https://foo:443/", + "base": null, + "href": "https://foo/", + "origin": "https://foo", + "protocol": "https:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://foo:80/", + "base": null, + "href": "https://foo:80/", + "origin": "https://foo:80", + "protocol": "https:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp://foo:21/", + "base": null, + "href": "ftp://foo/", + "origin": "ftp://foo", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp://foo:80/", + "base": null, + "href": "ftp://foo:80/", + "origin": "ftp://foo:80", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "gopher://foo:70/", + "base": null, + "href": "gopher://foo:70/", + "origin": "null", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "foo:70", + "hostname": "foo", + "port": "70", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "gopher://foo:443/", + "base": null, + "href": "gopher://foo:443/", + "origin": "null", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "foo:443", + "hostname": "foo", + "port": "443", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:80/", + "base": null, + "href": "ws://foo/", + "origin": "ws://foo", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:81/", + "base": null, + "href": "ws://foo:81/", + "origin": "ws://foo:81", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:443/", + "base": null, + "href": "ws://foo:443/", + "origin": "ws://foo:443", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:443", + "hostname": "foo", + "port": "443", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:815/", + "base": null, + "href": "ws://foo:815/", + "origin": "ws://foo:815", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:815", + "hostname": "foo", + "port": "815", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:80/", + "base": null, + "href": "wss://foo:80/", + "origin": "wss://foo:80", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:81/", + "base": null, + "href": "wss://foo:81/", + "origin": "wss://foo:81", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:443/", + "base": null, + "href": "wss://foo/", + "origin": "wss://foo", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:815/", + "base": null, + "href": "wss://foo:815/", + "origin": "wss://foo:815", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:815", + "hostname": "foo", + "port": "815", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/example.com/", + "base": null, + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp:/example.com/", + "base": null, + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:/example.com/", + "base": null, + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:/example.com/", + "base": null, + "href": "madeupscheme:/example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file:/example.com/", + "base": null, + "href": "file:///example.com/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:/example.com/", + "base": null, + "href": "ftps:/example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:/example.com/", + "base": null, + "href": "gopher:/example.com/", + "origin": "null", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ws:/example.com/", + "base": null, + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:/example.com/", + "base": null, + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/example.com/", + "base": null, + "href": "data:/example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/example.com/", + "base": null, + "href": "javascript:/example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/example.com/", + "base": null, + "href": "mailto:/example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "http:example.com/", + "base": null, + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp:example.com/", + "base": null, + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:example.com/", + "base": null, + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:example.com/", + "base": null, + "href": "madeupscheme:example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:example.com/", + "base": null, + "href": "ftps:example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:example.com/", + "base": null, + "href": "gopher:example.com/", + "origin": "null", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ws:example.com/", + "base": null, + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:example.com/", + "base": null, + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:example.com/", + "base": null, + "href": "data:example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:example.com/", + "base": null, + "href": "javascript:example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:example.com/", + "base": null, + "href": "mailto:example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html", + { + "input": "http:@www.example.com", + "base": null, + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/@www.example.com", + "base": null, + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://@www.example.com", + "base": null, + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:a:b@www.example.com", + "base": null, + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/a:b@www.example.com", + "base": null, + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:b@www.example.com", + "base": null, + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://@pple.com", + "base": null, + "href": "http://pple.com/", + "origin": "http://pple.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "pple.com", + "hostname": "pple.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http::b@www.example.com", + "base": null, + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/:b@www.example.com", + "base": null, + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://:b@www.example.com", + "base": null, + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/:@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http://user@/www.example.com", + "base": null, + "failure": true + }, + { + "input": "http:@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http:/@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http://@/www.example.com", + "base": null, + "failure": true + }, + { + "input": "https:@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http:a:b@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http:/a:b@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http://a:b@/www.example.com", + "base": null, + "failure": true + }, + { + "input": "http::@/www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http:a:@www.example.com", + "base": null, + "href": "http://a@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/a:@www.example.com", + "base": null, + "href": "http://a@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:@www.example.com", + "base": null, + "href": "http://a@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://www.@pple.com", + "base": null, + "href": "http://www.@pple.com/", + "origin": "http://pple.com", + "protocol": "http:", + "username": "www.", + "password": "", + "host": "pple.com", + "hostname": "pple.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:@:www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http:/@:www.example.com", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "http://@:www.example.com", + "base": null, + "failure": true + }, + { + "input": "http://:@www.example.com", + "base": null, + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# Others", + { + "input": "/", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": ".", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "./test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../aaa/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/aaa/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/aaa/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../../test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "中/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/%E4%B8%AD/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/%E4%B8%AD/test.txt", + "search": "", + "hash": "" + }, + { + "input": "http://www.example2.com", + "base": "http://www.example.com/test", + "href": "http://www.example2.com/", + "origin": "http://www.example2.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example2.com", + "hostname": "www.example2.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "//www.example2.com", + "base": "http://www.example.com/test", + "href": "http://www.example2.com/", + "origin": "http://www.example2.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example2.com", + "hostname": "www.example2.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:...", + "base": "http://www.example.com/test", + "href": "file:///...", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/...", + "search": "", + "hash": "" + }, + { + "input": "file:..", + "base": "http://www.example.com/test", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:a", + "base": "http://www.example.com/test", + "href": "file:///a", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/a", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html", + "Basic canonicalization, uppercase should be converted to lowercase", + { + "input": "http://ExAmPlE.CoM", + "base": "http://other.com/", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://example example.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://Goo%20 goo%7C|.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[:]", + "base": "http://other.com/", + "failure": true + }, + "U+3000 is mapped to U+0020 (space) which is disallowed", + { + "input": "http://GOO\u00a0\u3000goo.com", + "base": "http://other.com/", + "failure": true + }, + "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored", + { + "input": "http://GOO\u200b\u2060\ufeffgoo.com", + "base": "http://other.com/", + "href": "http://googoo.com/", + "origin": "http://googoo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "googoo.com", + "hostname": "googoo.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Leading and trailing C0 control or space", + { + "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ", + "base": null, + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)", + { + "input": "http://www.foo。bar.com", + "base": "http://other.com/", + "href": "http://www.foo.bar.com/", + "origin": "http://www.foo.bar.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.foo.bar.com", + "hostname": "www.foo.bar.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0", + { + "input": "http://\ufdd0zyx.com", + "base": "http://other.com/", + "failure": true + }, + "This is the same as previous but escaped", + { + "input": "http://%ef%b7%90zyx.com", + "base": "http://other.com/", + "failure": true + }, + "U+FFFD", + { + "input": "https://\ufffd", + "base": null, + "failure": true + }, + { + "input": "https://%EF%BF%BD", + "base": null, + "failure": true + }, + { + "input": "https://x/\ufffd?\ufffd#\ufffd", + "base": null, + "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD", + "origin": "https://x", + "protocol": "https:", + "username": "", + "password": "", + "host": "x", + "hostname": "x", + "port": "", + "pathname": "/%EF%BF%BD", + "search": "?%EF%BF%BD", + "hash": "#%EF%BF%BD" + }, + "Domain is ASCII, but a label is invalid IDNA", + { + "input": "http://a.b.c.xn--pokxncvks", + "base": null, + "failure": true + }, + { + "input": "http://10.0.0.xn--pokxncvks", + "base": null, + "failure": true + }, + "IDNA labels should be matched case-insensitively", + { + "input": "http://a.b.c.XN--pokxncvks", + "base": null, + "failure": true + }, + { + "input": "http://a.b.c.Xn--pokxncvks", + "base": null, + "failure": true + }, + { + "input": "http://10.0.0.XN--pokxncvks", + "base": null, + "failure": true + }, + { + "input": "http://10.0.0.xN--pokxncvks", + "base": null, + "failure": true + }, + "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.", + { + "input": "http://Go.com", + "base": "http://other.com/", + "href": "http://go.com/", + "origin": "http://go.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "go.com", + "hostname": "go.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257", + { + "input": "http://%41.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com", + "base": "http://other.com/", + "failure": true + }, + "...%00 in fullwidth should fail (also as escaped UTF-8 input)", + { + "input": "http://%00.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com", + "base": "http://other.com/", + "failure": true + }, + "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN", + { + "input": "http://你好你好", + "base": "http://other.com/", + "href": "http://xn--6qqa088eba/", + "origin": "http://xn--6qqa088eba", + "protocol": "http:", + "username": "", + "password": "", + "host": "xn--6qqa088eba", + "hostname": "xn--6qqa088eba", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://faß.ExAmPlE/", + "base": null, + "href": "https://xn--fa-hia.example/", + "origin": "https://xn--fa-hia.example", + "protocol": "https:", + "username": "", + "password": "", + "host": "xn--fa-hia.example", + "hostname": "xn--fa-hia.example", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "sc://faß.ExAmPlE/", + "base": null, + "href": "sc://fa%C3%9F.ExAmPlE/", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "fa%C3%9F.ExAmPlE", + "hostname": "fa%C3%9F.ExAmPlE", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191", + { + "input": "http://%zz%66%a.com", + "base": "http://other.com/", + "failure": true + }, + "If we get an invalid character that has been escaped.", + { + "input": "http://%25", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://hello%00", + "base": "http://other.com/", + "failure": true + }, + "Escaped numbers should be treated like IP addresses if they are.", + { + "input": "http://%30%78%63%30%2e%30%32%35%30.01", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.168.0.257", + "base": "http://other.com/", + "failure": true + }, + "Invalid escaping in hosts causes failure", + { + "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01", + "base": "http://other.com/", + "failure": true + }, + "A space in a host causes failure", + { + "input": "http://192.168.0.1 hello", + "base": "http://other.com/", + "failure": true + }, + { + "input": "https://x x:12", + "base": null, + "failure": true + }, + "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP", + { + "input": "http://0Xc0.0250.01", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Domains with empty labels", + { + "input": "http://./", + "base": null, + "href": "http://./", + "origin": "http://.", + "protocol": "http:", + "username": "", + "password": "", + "host": ".", + "hostname": ".", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://../", + "base": null, + "href": "http://../", + "origin": "http://..", + "protocol": "http:", + "username": "", + "password": "", + "host": "..", + "hostname": "..", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Non-special domains with empty labels", + { + "input": "h://.", + "base": null, + "href": "h://.", + "origin": "null", + "protocol": "h:", + "username": "", + "password": "", + "host": ".", + "hostname": ".", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, + "Broken IPv6", + { + "input": "http://[www.google.com]/", + "base": null, + "failure": true + }, + { + "input": "http://[google.com]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::1.2.3.4x]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::1.2.3.]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::1.2.]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::.1.2]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::1.]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::.1]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[::%31]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%5B::1]", + "base": "http://other.com/", + "failure": true + }, + "Misc Unicode", + { + "input": "http://foo:💩@example.com/bar", + "base": "http://other.com/", + "href": "http://foo:%F0%9F%92%A9@example.com/bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "foo", + "password": "%F0%9F%92%A9", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/bar", + "search": "", + "hash": "" + }, + "# resolving a fragment against any scheme succeeds", + { + "input": "#", + "base": "test:test", + "href": "test:test#", + "origin": "null", + "protocol": "test:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "", + "hash": "" + }, + { + "input": "#x", + "base": "mailto:x@x.com", + "href": "mailto:x@x.com#x", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "x@x.com", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "data:,", + "href": "data:,#x", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": ",", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "about:blank", + "href": "about:blank#x", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blank", + "search": "", + "hash": "#x" + }, + { + "input": "#x:y", + "base": "about:blank", + "href": "about:blank#x:y", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blank", + "search": "", + "hash": "#x:y" + }, + { + "input": "#", + "base": "test:test?test", + "href": "test:test?test#", + "origin": "null", + "protocol": "test:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "?test", + "hash": "" + }, + "# multiple @ in authority state", + { + "input": "https://@test@test@example:800/", + "base": "http://doesnotmatter/", + "href": "https://%40test%40test@example:800/", + "origin": "https://example:800", + "protocol": "https:", + "username": "%40test%40test", + "password": "", + "host": "example:800", + "hostname": "example", + "port": "800", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://@@@example", + "base": "http://doesnotmatter/", + "href": "https://%40%40@example/", + "origin": "https://example", + "protocol": "https:", + "username": "%40%40", + "password": "", + "host": "example", + "hostname": "example", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "non-az-09 characters", + { + "input": "http://`{}:`{}@h/`{}?`{}", + "base": "http://doesnotmatter/", + "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}", + "origin": "http://h", + "protocol": "http:", + "username": "%60%7B%7D", + "password": "%60%7B%7D", + "host": "h", + "hostname": "h", + "port": "", + "pathname": "/%60%7B%7D", + "search": "?`{}", + "hash": "" + }, + "byte is ' and url is special", + { + "input": "http://host/?'", + "base": null, + "href": "http://host/?%27", + "origin": "http://host", + "protocol": "http:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/", + "search": "?%27", + "hash": "" + }, + { + "input": "notspecial://host/?'", + "base": null, + "href": "notspecial://host/?'", + "origin": "null", + "protocol": "notspecial:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/", + "search": "?'", + "hash": "" + }, + "# Credentials in base", + { + "input": "/some/path", + "base": "http://user@example.org/smth", + "href": "http://user@example.org/some/path", + "origin": "http://example.org", + "protocol": "http:", + "username": "user", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/some/path", + "search": "", + "hash": "" + }, + { + "input": "", + "base": "http://user:pass@example.org:21/smth", + "href": "http://user:pass@example.org:21/smth", + "origin": "http://example.org:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "example.org:21", + "hostname": "example.org", + "port": "21", + "pathname": "/smth", + "search": "", + "hash": "" + }, + { + "input": "/some/path", + "base": "http://user:pass@example.org:21/smth", + "href": "http://user:pass@example.org:21/some/path", + "origin": "http://example.org:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "example.org:21", + "hostname": "example.org", + "port": "21", + "pathname": "/some/path", + "search": "", + "hash": "" + }, + "# a set of tests designed by zcorpan for relative URLs with unknown schemes", + { + "input": "i", + "base": "sc:sd", + "failure": true + }, + { + "input": "i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "i", + "base": "sc:/pa/pa", + "href": "sc:/pa/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/i", + "search": "", + "hash": "" + }, + { + "input": "i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "i", + "base": "sc:///pa/pa", + "href": "sc:///pa/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc:sd", + "failure": true + }, + { + "input": "../i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "../i", + "base": "sc:/pa/pa", + "href": "sc:/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc:///pa/pa", + "href": "sc:///i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc:sd", + "failure": true + }, + { + "input": "/i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "/i", + "base": "sc:/pa/pa", + "href": "sc:/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc:///pa/pa", + "href": "sc:///i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "?i", + "base": "sc:sd", + "failure": true + }, + { + "input": "?i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "?i", + "base": "sc:/pa/pa", + "href": "sc:/pa/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "?i", + "hash": "" + }, + { + "input": "?i", + "base": "sc://ho/pa", + "href": "sc://ho/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/pa", + "search": "?i", + "hash": "" + }, + { + "input": "?i", + "base": "sc:///pa/pa", + "href": "sc:///pa/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "?i", + "hash": "" + }, + { + "input": "#i", + "base": "sc:sd", + "href": "sc:sd#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "sd", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:sd/sd", + "href": "sc:sd/sd#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "sd/sd", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:/pa/pa", + "href": "sc:/pa/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc://ho/pa", + "href": "sc://ho/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/pa", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:///pa/pa", + "href": "sc:///pa/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "", + "hash": "#i" + }, + "# make sure that relative URL logic works on known typically non-relative schemes too", + { + "input": "about:/../", + "base": null, + "href": "about:/", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/../", + "base": null, + "href": "data:/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/../", + "base": null, + "href": "javascript:/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/../", + "base": null, + "href": "mailto:/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# unknown schemes and their hosts", + { + "input": "sc://ñ.test/", + "base": null, + "href": "sc://%C3%B1.test/", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1.test", + "hostname": "%C3%B1.test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "sc://%/", + "base": null, + "href": "sc://%/", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%", + "hostname": "%", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "sc://@/", + "base": null, + "failure": true + }, + { + "input": "sc://te@s:t@/", + "base": null, + "failure": true + }, + { + "input": "sc://:/", + "base": null, + "failure": true + }, + { + "input": "sc://:12/", + "base": null, + "failure": true + }, + { + "input": "x", + "base": "sc://ñ", + "href": "sc://%C3%B1/x", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1", + "hostname": "%C3%B1", + "port": "", + "pathname": "/x", + "search": "", + "hash": "" + }, + "# unknown schemes and backslashes", + { + "input": "sc:\\../", + "base": null, + "href": "sc:\\../", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\../", + "search": "", + "hash": "" + }, + "# unknown scheme with path looking like a password", + { + "input": "sc::a@example.net", + "base": null, + "href": "sc::a@example.net", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": ":a@example.net", + "search": "", + "hash": "" + }, + "# unknown scheme with bogus percent-encoding", + { + "input": "wow:%NBD", + "base": null, + "href": "wow:%NBD", + "origin": "null", + "protocol": "wow:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "%NBD", + "search": "", + "hash": "" + }, + { + "input": "wow:%1G", + "base": null, + "href": "wow:%1G", + "origin": "null", + "protocol": "wow:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "%1G", + "search": "", + "hash": "" + }, + "# unknown scheme with non-URL characters", + { + "input": "wow:\uFFFF", + "base": null, + "href": "wow:%EF%BF%BF", + "origin": "null", + "protocol": "wow:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "%EF%BF%BF", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF?\uD800\uD801\uDFFE\uDFFF\uFDD0\uFDCF\uFDEF\uFDF0\uFFFE\uFFFF", + "base": null, + "href": "http://example.com/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", + "search": "?%EF%BF%BD%F0%90%9F%BE%EF%BF%BD%EF%B7%90%EF%B7%8F%EF%B7%AF%EF%B7%B0%EF%BF%BE%EF%BF%BF", + "hash": "" + }, + "Forbidden host code points", + { + "input": "sc://a\u0000b/", + "base": null, + "failure": true + }, + { + "input": "sc://a b/", + "base": null, + "failure": true + }, + { + "input": "sc://a<b", + "base": null, + "failure": true + }, + { + "input": "sc://a>b", + "base": null, + "failure": true + }, + { + "input": "sc://a[b/", + "base": null, + "failure": true + }, + { + "input": "sc://a\\b/", + "base": null, + "failure": true + }, + { + "input": "sc://a]b/", + "base": null, + "failure": true + }, + { + "input": "sc://a^b", + "base": null, + "failure": true + }, + { + "input": "sc://a|b/", + "base": null, + "failure": true + }, + "Forbidden host codepoints: tabs and newlines are removed during preprocessing", + { + "input": "foo://ho\u0009st/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href":"foo://host/", + "password": "", + "pathname": "/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "" + }, + { + "input": "foo://ho\u000Ast/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href":"foo://host/", + "password": "", + "pathname": "/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "" + }, + { + "input": "foo://ho\u000Dst/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href":"foo://host/", + "password": "", + "pathname": "/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "" + }, + "Forbidden domain code-points", + { + "input": "http://a\u0000b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0001b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0002b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0003b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0004b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0005b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0006b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0007b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0008b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u000Bb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u000Cb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u000Eb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u000Fb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0010b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0011b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0012b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0013b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0014b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0015b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0016b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0017b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0018b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u0019b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u001Ab/", + "base": null, + "failure": true + }, + { + "input": "http://a\u001Bb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u001Cb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u001Db/", + "base": null, + "failure": true + }, + { + "input": "http://a\u001Eb/", + "base": null, + "failure": true + }, + { + "input": "http://a\u001Fb/", + "base": null, + "failure": true + }, + { + "input": "http://a b/", + "base": null, + "failure": true + }, + { + "input": "http://a%b/", + "base": null, + "failure": true + }, + { + "input": "http://a<b", + "base": null, + "failure": true + }, + { + "input": "http://a>b", + "base": null, + "failure": true + }, + { + "input": "http://a[b/", + "base": null, + "failure": true + }, + { + "input": "http://a]b/", + "base": null, + "failure": true + }, + { + "input": "http://a^b", + "base": null, + "failure": true + }, + { + "input": "http://a|b/", + "base": null, + "failure": true + }, + { + "input": "http://a\u007Fb/", + "base": null, + "failure": true + }, + "Forbidden domain codepoints: tabs and newlines are removed during preprocessing", + { + "input": "http://ho\u0009st/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href":"http://host/", + "password": "", + "pathname": "/", + "port":"", + "protocol": "http:", + "search": "", + "username": "" + }, + { + "input": "http://ho\u000Ast/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href":"http://host/", + "password": "", + "pathname": "/", + "port":"", + "protocol": "http:", + "search": "", + "username": "" + }, + { + "input": "http://ho\u000Dst/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href":"http://host/", + "password": "", + "pathname": "/", + "port":"", + "protocol": "http:", + "search": "", + "username": "" + }, + "Encoded forbidden domain codepoints in special URLs", + { + "input": "http://ho%00st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%01st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%02st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%03st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%04st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%05st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%06st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%07st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%08st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%09st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%0Ast/", + "base": null, + "failure": true + }, + { + "input": "http://ho%0Bst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%0Cst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%0Dst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%0Est/", + "base": null, + "failure": true + }, + { + "input": "http://ho%0Fst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%10st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%11st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%12st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%13st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%14st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%15st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%16st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%17st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%18st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%19st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%1Ast/", + "base": null, + "failure": true + }, + { + "input": "http://ho%1Bst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%1Cst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%1Dst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%1Est/", + "base": null, + "failure": true + }, + { + "input": "http://ho%1Fst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%20st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%23st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%25st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%2Fst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%3Ast/", + "base": null, + "failure": true + }, + { + "input": "http://ho%3Cst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%3Est/", + "base": null, + "failure": true + }, + { + "input": "http://ho%3Fst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%40st/", + "base": null, + "failure": true + }, + { + "input": "http://ho%5Bst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%5Cst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%5Dst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%7Cst/", + "base": null, + "failure": true + }, + { + "input": "http://ho%7Fst/", + "base": null, + "failure": true + }, + "Allowed host/domain code points", + { + "input": "http://!\"$&'()*+,-.;=_`{}~/", + "base": null, + "href": "http://!\"$&'()*+,-.;=_`{}~/", + "origin": "http://!\"$&'()*+,-.;=_`{}~", + "protocol": "http:", + "username": "", + "password": "", + "host": "!\"$&'()*+,-.;=_`{}~", + "hostname": "!\"$&'()*+,-.;=_`{}~", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$%&'()*+,-.;=_`{}~/", + "base": null, + "href": "sc://%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~/", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~", + "hostname": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# Hosts and percent-encoding", + { + "input": "ftp://example.com%80/", + "base": null, + "failure": true + }, + { + "input": "ftp://example.com%A0/", + "base": null, + "failure": true + }, + { + "input": "https://example.com%80/", + "base": null, + "failure": true + }, + { + "input": "https://example.com%A0/", + "base": null, + "failure": true + }, + { + "input": "ftp://%e2%98%83", + "base": null, + "href": "ftp://xn--n3h/", + "origin": "ftp://xn--n3h", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "xn--n3h", + "hostname": "xn--n3h", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://%e2%98%83", + "base": null, + "href": "https://xn--n3h/", + "origin": "https://xn--n3h", + "protocol": "https:", + "username": "", + "password": "", + "host": "xn--n3h", + "hostname": "xn--n3h", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# tests from jsdom/whatwg-url designed for code coverage", + { + "input": "http://127.0.0.1:10100/relative_import.html", + "base": null, + "href": "http://127.0.0.1:10100/relative_import.html", + "origin": "http://127.0.0.1:10100", + "protocol": "http:", + "username": "", + "password": "", + "host": "127.0.0.1:10100", + "hostname": "127.0.0.1", + "port": "10100", + "pathname": "/relative_import.html", + "search": "", + "hash": "" + }, + { + "input": "http://facebook.com/?foo=%7B%22abc%22", + "base": null, + "href": "http://facebook.com/?foo=%7B%22abc%22", + "origin": "http://facebook.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "facebook.com", + "hostname": "facebook.com", + "port": "", + "pathname": "/", + "search": "?foo=%7B%22abc%22", + "hash": "" + }, + { + "input": "https://localhost:3000/jqueryui@1.2.3", + "base": null, + "href": "https://localhost:3000/jqueryui@1.2.3", + "origin": "https://localhost:3000", + "protocol": "https:", + "username": "", + "password": "", + "host": "localhost:3000", + "hostname": "localhost", + "port": "3000", + "pathname": "/jqueryui@1.2.3", + "search": "", + "hash": "" + }, + "# tab/LF/CR", + { + "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg", + "base": null, + "href": "http://host:9000/path?query#frag", + "origin": "http://host:9000", + "protocol": "http:", + "username": "", + "password": "", + "host": "host:9000", + "hostname": "host", + "port": "9000", + "pathname": "/path", + "search": "?query", + "hash": "#frag" + }, + "# Stringification of URL.searchParams", + { + "input": "?a=b&c=d", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar?a=b&c=d", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "?a=b&c=d", + "searchParams": "a=b&c=d", + "hash": "" + }, + { + "input": "??a=b&c=d", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar??a=b&c=d", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "??a=b&c=d", + "searchParams": "%3Fa=b&c=d", + "hash": "" + }, + "# Scheme only", + { + "input": "http:", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "searchParams": "", + "hash": "" + }, + { + "input": "http:", + "base": "https://example.org/foo/bar", + "failure": true + }, + { + "input": "sc:", + "base": "https://example.org/foo/bar", + "href": "sc:", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "", + "search": "", + "searchParams": "", + "hash": "" + }, + "# Percent encoding of fragments", + { + "input": "http://foo.bar/baz?qux#foo\bbar", + "base": null, + "href": "http://foo.bar/baz?qux#foo%08bar", + "origin": "http://foo.bar", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.bar", + "hostname": "foo.bar", + "port": "", + "pathname": "/baz", + "search": "?qux", + "searchParams": "qux=", + "hash": "#foo%08bar" + }, + { + "input": "http://foo.bar/baz?qux#foo\"bar", + "base": null, + "href": "http://foo.bar/baz?qux#foo%22bar", + "origin": "http://foo.bar", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.bar", + "hostname": "foo.bar", + "port": "", + "pathname": "/baz", + "search": "?qux", + "searchParams": "qux=", + "hash": "#foo%22bar" + }, + { + "input": "http://foo.bar/baz?qux#foo<bar", + "base": null, + "href": "http://foo.bar/baz?qux#foo%3Cbar", + "origin": "http://foo.bar", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.bar", + "hostname": "foo.bar", + "port": "", + "pathname": "/baz", + "search": "?qux", + "searchParams": "qux=", + "hash": "#foo%3Cbar" + }, + { + "input": "http://foo.bar/baz?qux#foo>bar", + "base": null, + "href": "http://foo.bar/baz?qux#foo%3Ebar", + "origin": "http://foo.bar", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.bar", + "hostname": "foo.bar", + "port": "", + "pathname": "/baz", + "search": "?qux", + "searchParams": "qux=", + "hash": "#foo%3Ebar" + }, + { + "input": "http://foo.bar/baz?qux#foo`bar", + "base": null, + "href": "http://foo.bar/baz?qux#foo%60bar", + "origin": "http://foo.bar", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.bar", + "hostname": "foo.bar", + "port": "", + "pathname": "/baz", + "search": "?qux", + "searchParams": "qux=", + "hash": "#foo%60bar" + }, + "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)", + { + "input": "http://1.2.3.4/", + "base": "http://other.com/", + "href": "http://1.2.3.4/", + "origin": "http://1.2.3.4", + "protocol": "http:", + "username": "", + "password": "", + "host": "1.2.3.4", + "hostname": "1.2.3.4", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://1.2.3.4./", + "base": "http://other.com/", + "href": "http://1.2.3.4/", + "origin": "http://1.2.3.4", + "protocol": "http:", + "username": "", + "password": "", + "host": "1.2.3.4", + "hostname": "1.2.3.4", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.168.257", + "base": "http://other.com/", + "href": "http://192.168.1.1/", + "origin": "http://192.168.1.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.1.1", + "hostname": "192.168.1.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.168.257.", + "base": "http://other.com/", + "href": "http://192.168.1.1/", + "origin": "http://192.168.1.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.1.1", + "hostname": "192.168.1.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.168.257.com", + "base": "http://other.com/", + "href": "http://192.168.257.com/", + "origin": "http://192.168.257.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.257.com", + "hostname": "192.168.257.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://256", + "base": "http://other.com/", + "href": "http://0.0.1.0/", + "origin": "http://0.0.1.0", + "protocol": "http:", + "username": "", + "password": "", + "host": "0.0.1.0", + "hostname": "0.0.1.0", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://256.com", + "base": "http://other.com/", + "href": "http://256.com/", + "origin": "http://256.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "256.com", + "hostname": "256.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://999999999", + "base": "http://other.com/", + "href": "http://59.154.201.255/", + "origin": "http://59.154.201.255", + "protocol": "http:", + "username": "", + "password": "", + "host": "59.154.201.255", + "hostname": "59.154.201.255", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://999999999.", + "base": "http://other.com/", + "href": "http://59.154.201.255/", + "origin": "http://59.154.201.255", + "protocol": "http:", + "username": "", + "password": "", + "host": "59.154.201.255", + "hostname": "59.154.201.255", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://999999999.com", + "base": "http://other.com/", + "href": "http://999999999.com/", + "origin": "http://999999999.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "999999999.com", + "hostname": "999999999.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://10000000000", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://10000000000.com", + "base": "http://other.com/", + "href": "http://10000000000.com/", + "origin": "http://10000000000.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "10000000000.com", + "hostname": "10000000000.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://4294967295", + "base": "http://other.com/", + "href": "http://255.255.255.255/", + "origin": "http://255.255.255.255", + "protocol": "http:", + "username": "", + "password": "", + "host": "255.255.255.255", + "hostname": "255.255.255.255", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://4294967296", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://0xffffffff", + "base": "http://other.com/", + "href": "http://255.255.255.255/", + "origin": "http://255.255.255.255", + "protocol": "http:", + "username": "", + "password": "", + "host": "255.255.255.255", + "hostname": "255.255.255.255", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://0xffffffff1", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://256.256.256.256", + "base": "http://other.com/", + "failure": true + }, + { + "input": "https://0x.0x.0", + "base": null, + "href": "https://0.0.0.0/", + "origin": "https://0.0.0.0", + "protocol": "https:", + "username": "", + "password": "", + "host": "0.0.0.0", + "hostname": "0.0.0.0", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)", + { + "input": "https://0x100000000/test", + "base": null, + "failure": true + }, + { + "input": "https://256.0.0.1/test", + "base": null, + "failure": true + }, + "# file URLs containing percent-encoded Windows drive letters (shouldn't work)", + { + "input": "file:///C%3A/", + "base": null, + "href": "file:///C%3A/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C%3A/", + "search": "", + "hash": "" + }, + { + "input": "file:///C%7C/", + "base": null, + "href": "file:///C%7C/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C%7C/", + "search": "", + "hash": "" + }, + { + "input": "file://%43%3A", + "base": null, + "failure": true + }, + { + "input": "file://%43%7C", + "base": null, + "failure": true + }, + { + "input": "file://%43|", + "base": null, + "failure": true + }, + { + "input": "file://C%7C", + "base": null, + "failure": true + }, + { + "input": "file://%43%7C/", + "base": null, + "failure": true + }, + { + "input": "https://%43%7C/", + "base": null, + "failure": true + }, + { + "input": "asdf://%43|/", + "base": null, + "failure": true + }, + { + "input": "asdf://%43%7C/", + "base": null, + "href": "asdf://%43%7C/", + "origin": "null", + "protocol": "asdf:", + "username": "", + "password": "", + "host": "%43%7C", + "hostname": "%43%7C", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)", + { + "input": "pix/submit.gif", + "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html", + "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "file:///C:/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "file:///", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# More file URL tests by zcorpan and annevk", + { + "input": "/", + "base": "file:///C:/a/b", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "/", + "base": "file://h/C:/a/b", + "href": "file://h/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "h", + "hostname": "h", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "/", + "base": "file://h/a/b", + "href": "file://h/", + "protocol": "file:", + "username": "", + "password": "", + "host": "h", + "hostname": "h", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "//d:", + "base": "file:///C:/a/b", + "href": "file:///d:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/d:", + "search": "", + "hash": "" + }, + { + "input": "//d:/..", + "base": "file:///C:/a/b", + "href": "file:///d:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/d:/", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "file:///ab:/", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "file:///1:/", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "", + "base": "file:///test?test#test", + "href": "file:///test?test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?test", + "hash": "" + }, + { + "input": "file:", + "base": "file:///test?test#test", + "href": "file:///test?test", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?test", + "hash": "" + }, + { + "input": "?x", + "base": "file:///test?test#test", + "href": "file:///test?x", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?x", + "hash": "" + }, + { + "input": "file:?x", + "base": "file:///test?test#test", + "href": "file:///test?x", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?x", + "hash": "" + }, + { + "input": "#x", + "base": "file:///test?test#test", + "href": "file:///test?test#x", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?test", + "hash": "#x" + }, + { + "input": "file:#x", + "base": "file:///test?test#test", + "href": "file:///test?test#x", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?test", + "hash": "#x" + }, + "# File URLs and many (back)slashes", + { + "input": "file:\\\\//", + "base": null, + "href": "file:////", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "file:\\\\\\\\", + "base": null, + "href": "file:////", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "file:\\\\\\\\?fox", + "base": null, + "href": "file:////?fox", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "?fox", + "hash": "" + }, + { + "input": "file:\\\\\\\\#guppy", + "base": null, + "href": "file:////#guppy", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "#guppy" + }, + { + "input": "file://spider///", + "base": null, + "href": "file://spider///", + "protocol": "file:", + "username": "", + "password": "", + "host": "spider", + "hostname": "spider", + "port": "", + "pathname": "///", + "search": "", + "hash": "" + }, + { + "input": "file:\\\\localhost//", + "base": null, + "href": "file:////", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "file:///localhost//cat", + "base": null, + "href": "file:///localhost//cat", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/localhost//cat", + "search": "", + "hash": "" + }, + { + "input": "file://\\/localhost//cat", + "base": null, + "href": "file:////localhost//cat", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//localhost//cat", + "search": "", + "hash": "" + }, + { + "input": "file://localhost//a//../..//", + "base": null, + "href": "file://///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///", + "search": "", + "hash": "" + }, + { + "input": "/////mouse", + "base": "file:///elephant", + "href": "file://///mouse", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///mouse", + "search": "", + "hash": "" + }, + { + "input": "\\//pig", + "base": "file://lion/", + "href": "file:///pig", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pig", + "search": "", + "hash": "" + }, + { + "input": "\\/localhost//pig", + "base": "file://lion/", + "href": "file:////pig", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//pig", + "search": "", + "hash": "" + }, + { + "input": "//localhost//pig", + "base": "file://lion/", + "href": "file:////pig", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//pig", + "search": "", + "hash": "" + }, + { + "input": "/..//localhost//pig", + "base": "file://lion/", + "href": "file://lion//localhost//pig", + "protocol": "file:", + "username": "", + "password": "", + "host": "lion", + "hostname": "lion", + "port": "", + "pathname": "//localhost//pig", + "search": "", + "hash": "" + }, + { + "input": "file://", + "base": "file://ape/", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# File URLs with non-empty hosts", + { + "input": "/rooibos", + "base": "file://tea/", + "href": "file://tea/rooibos", + "protocol": "file:", + "username": "", + "password": "", + "host": "tea", + "hostname": "tea", + "port": "", + "pathname": "/rooibos", + "search": "", + "hash": "" + }, + { + "input": "/?chai", + "base": "file://tea/", + "href": "file://tea/?chai", + "protocol": "file:", + "username": "", + "password": "", + "host": "tea", + "hostname": "tea", + "port": "", + "pathname": "/", + "search": "?chai", + "hash": "" + }, + "# Windows drive letter handling with the 'file:' base URL", + { + "input": "C|", + "base": "file://host/dir/file", + "href": "file://host/C:", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:", + "search": "", + "hash": "" + }, + { + "input": "C|", + "base": "file://host/D:/dir1/dir2/file", + "href": "file://host/C:", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:", + "search": "", + "hash": "" + }, + { + "input": "C|#", + "base": "file://host/dir/file", + "href": "file://host/C:#", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:", + "search": "", + "hash": "" + }, + { + "input": "C|?", + "base": "file://host/dir/file", + "href": "file://host/C:?", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:", + "search": "", + "hash": "" + }, + { + "input": "C|/", + "base": "file://host/dir/file", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "C|\n/", + "base": "file://host/dir/file", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "C|\\", + "base": "file://host/dir/file", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "C", + "base": "file://host/dir/file", + "href": "file://host/dir/C", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/dir/C", + "search": "", + "hash": "" + }, + { + "input": "C|a", + "base": "file://host/dir/file", + "href": "file://host/dir/C|a", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/dir/C|a", + "search": "", + "hash": "" + }, + "# Windows drive letter quirk in the file slash state", + { + "input": "/c:/foo/bar", + "base": "file:///c:/baz/qux", + "href": "file:///c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/c|/foo/bar", + "base": "file:///c:/baz/qux", + "href": "file:///c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "file:\\c:\\foo\\bar", + "base": "file:///c:/baz/qux", + "href": "file:///c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/c:/foo/bar", + "base": "file://host/path", + "href": "file://host/c:/foo/bar", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/c:/foo/bar", + "search": "", + "hash": "" + }, + "# Do not drop the host in the presence of a drive letter", + { + "input": "file://example.net/C:/", + "base": null, + "href": "file://example.net/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "example.net", + "hostname": "example.net", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file://1.2.3.4/C:/", + "base": null, + "href": "file://1.2.3.4/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "1.2.3.4", + "hostname": "1.2.3.4", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file://[1::8]/C:/", + "base": null, + "href": "file://[1::8]/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "[1::8]", + "hostname": "[1::8]", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# Copy the host from the base URL in the following cases", + { + "input": "C|/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "/C:/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file:C:/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file:/C:/", + "base": "file://host/", + "href": "file://host/C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "host", + "hostname": "host", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# Copy the empty host from the input in the following cases", + { + "input": "//C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file://C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "///C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file:///C:/", + "base": "file://host/", + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# Windows drive letter quirk (no host)", + { + "input": "file:/C|/", + "base": null, + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + { + "input": "file://C|/", + "base": null, + "href": "file:///C:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/", + "search": "", + "hash": "" + }, + "# file URLs without base URL by Rimas Misevičius", + { + "input": "file:", + "base": null, + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:?q=v", + "base": null, + "href": "file:///?q=v", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "?q=v", + "hash": "" + }, + { + "input": "file:#frag", + "base": null, + "href": "file:///#frag", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "#frag" + }, + "# file: drive letter cases from https://crbug.com/1078698", + { + "input": "file:///Y:", + "base": null, + "href": "file:///Y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y:", + "search": "", + "hash": "" + }, + { + "input": "file:///Y:/", + "base": null, + "href": "file:///Y:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y:/", + "search": "", + "hash": "" + }, + { + "input": "file:///./Y", + "base": null, + "href": "file:///Y", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y", + "search": "", + "hash": "" + }, + { + "input": "file:///./Y:", + "base": null, + "href": "file:///Y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/Y:", + "search": "", + "hash": "" + }, + { + "input": "\\\\\\.\\Y:", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + "# file: drive letter cases from https://crbug.com/1078698 but lowercased", + { + "input": "file:///y:", + "base": null, + "href": "file:///y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y:", + "search": "", + "hash": "" + }, + { + "input": "file:///y:/", + "base": null, + "href": "file:///y:/", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y:/", + "search": "", + "hash": "" + }, + { + "input": "file:///./y", + "base": null, + "href": "file:///y", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y", + "search": "", + "hash": "" + }, + { + "input": "file:///./y:", + "base": null, + "href": "file:///y:", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/y:", + "search": "", + "hash": "" + }, + { + "input": "\\\\\\.\\y:", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)", + { + "input": "file://localhost//a//../..//foo", + "base": null, + "href": "file://///foo", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///foo", + "search": "", + "hash": "" + }, + { + "input": "file://localhost////foo", + "base": null, + "href": "file://////foo", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "////foo", + "search": "", + "hash": "" + }, + { + "input": "file:////foo", + "base": null, + "href": "file:////foo", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//foo", + "search": "", + "hash": "" + }, + { + "input": "file:///one/two", + "base": "file:///", + "href": "file:///one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/one/two", + "search": "", + "hash": "" + }, + { + "input": "file:////one/two", + "base": "file:///", + "href": "file:////one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//one/two", + "search": "", + "hash": "" + }, + { + "input": "//one/two", + "base": "file:///", + "href": "file://one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "one", + "hostname": "one", + "port": "", + "pathname": "/two", + "search": "", + "hash": "" + }, + { + "input": "///one/two", + "base": "file:///", + "href": "file:///one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/one/two", + "search": "", + "hash": "" + }, + { + "input": "////one/two", + "base": "file:///", + "href": "file:////one/two", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//one/two", + "search": "", + "hash": "" + }, + { + "input": "file:///.//", + "base": "file:////", + "href": "file:////", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + "File URL tests for https://github.com/whatwg/url/issues/549", + { + "input": "file:.//p", + "base": null, + "href": "file:////p", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//p", + "search": "", + "hash": "" + }, + { + "input": "file:/.//p", + "base": null, + "href": "file:////p", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//p", + "search": "", + "hash": "" + }, + "# IPv6 tests", + { + "input": "http://[1:0::]", + "base": "http://example.net/", + "href": "http://[1::]/", + "origin": "http://[1::]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[1::]", + "hostname": "[1::]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[0:1:2:3:4:5:6:7:8]", + "base": "http://example.net/", + "failure": true + }, + { + "input": "https://[0::0::0]", + "base": null, + "failure": true + }, + { + "input": "https://[0:.0]", + "base": null, + "failure": true + }, + { + "input": "https://[0:0:]", + "base": null, + "failure": true + }, + { + "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]", + "base": null, + "failure": true + }, + { + "input": "https://[0:1.00.0.0.0]", + "base": null, + "failure": true + }, + { + "input": "https://[0:1.290.0.0.0]", + "base": null, + "failure": true + }, + { + "input": "https://[0:1.23.23]", + "base": null, + "failure": true + }, + "# Empty host", + { + "input": "http://?", + "base": null, + "failure": true + }, + { + "input": "http://#", + "base": null, + "failure": true + }, + "Port overflow (2^32 + 81)", + { + "input": "http://f:4294967377/c", + "base": "http://example.org/", + "failure": true + }, + "Port overflow (2^64 + 81)", + { + "input": "http://f:18446744073709551697/c", + "base": "http://example.org/", + "failure": true + }, + "Port overflow (2^128 + 81)", + { + "input": "http://f:340282366920938463463374607431768211537/c", + "base": "http://example.org/", + "failure": true + }, + "# Non-special-URL path tests", + { + "input": "sc://ñ", + "base": null, + "href": "sc://%C3%B1", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1", + "hostname": "%C3%B1", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "sc://ñ?x", + "base": null, + "href": "sc://%C3%B1?x", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1", + "hostname": "%C3%B1", + "port": "", + "pathname": "", + "search": "?x", + "hash": "" + }, + { + "input": "sc://ñ#x", + "base": null, + "href": "sc://%C3%B1#x", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1", + "hostname": "%C3%B1", + "port": "", + "pathname": "", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "sc://ñ", + "href": "sc://%C3%B1#x", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1", + "hostname": "%C3%B1", + "port": "", + "pathname": "", + "search": "", + "hash": "#x" + }, + { + "input": "?x", + "base": "sc://ñ", + "href": "sc://%C3%B1?x", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "%C3%B1", + "hostname": "%C3%B1", + "port": "", + "pathname": "", + "search": "?x", + "hash": "" + }, + { + "input": "sc://?", + "base": null, + "href": "sc://?", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "sc://#", + "base": null, + "href": "sc://#", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "///", + "base": "sc://x/", + "href": "sc:///", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "////", + "base": "sc://x/", + "href": "sc:////", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "////x/", + "base": "sc://x/", + "href": "sc:////x/", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//x/", + "search": "", + "hash": "" + }, + { + "input": "tftp://foobar.com/someconfig;mode=netascii", + "base": null, + "href": "tftp://foobar.com/someconfig;mode=netascii", + "origin": "null", + "protocol": "tftp:", + "username": "", + "password": "", + "host": "foobar.com", + "hostname": "foobar.com", + "port": "", + "pathname": "/someconfig;mode=netascii", + "search": "", + "hash": "" + }, + { + "input": "telnet://user:pass@foobar.com:23/", + "base": null, + "href": "telnet://user:pass@foobar.com:23/", + "origin": "null", + "protocol": "telnet:", + "username": "user", + "password": "pass", + "host": "foobar.com:23", + "hostname": "foobar.com", + "port": "23", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ut2004://10.10.10.10:7777/Index.ut2", + "base": null, + "href": "ut2004://10.10.10.10:7777/Index.ut2", + "origin": "null", + "protocol": "ut2004:", + "username": "", + "password": "", + "host": "10.10.10.10:7777", + "hostname": "10.10.10.10", + "port": "7777", + "pathname": "/Index.ut2", + "search": "", + "hash": "" + }, + { + "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", + "base": null, + "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz", + "origin": "null", + "protocol": "redis:", + "username": "foo", + "password": "bar", + "host": "somehost:6379", + "hostname": "somehost", + "port": "6379", + "pathname": "/0", + "search": "?baz=bam&qux=baz", + "hash": "" + }, + { + "input": "rsync://foo@host:911/sup", + "base": null, + "href": "rsync://foo@host:911/sup", + "origin": "null", + "protocol": "rsync:", + "username": "foo", + "password": "", + "host": "host:911", + "hostname": "host", + "port": "911", + "pathname": "/sup", + "search": "", + "hash": "" + }, + { + "input": "git://github.com/foo/bar.git", + "base": null, + "href": "git://github.com/foo/bar.git", + "origin": "null", + "protocol": "git:", + "username": "", + "password": "", + "host": "github.com", + "hostname": "github.com", + "port": "", + "pathname": "/foo/bar.git", + "search": "", + "hash": "" + }, + { + "input": "irc://myserver.com:6999/channel?passwd", + "base": null, + "href": "irc://myserver.com:6999/channel?passwd", + "origin": "null", + "protocol": "irc:", + "username": "", + "password": "", + "host": "myserver.com:6999", + "hostname": "myserver.com", + "port": "6999", + "pathname": "/channel", + "search": "?passwd", + "hash": "" + }, + { + "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "base": null, + "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT", + "origin": "null", + "protocol": "dns:", + "username": "", + "password": "", + "host": "fw.example.org:9999", + "hostname": "fw.example.org", + "port": "9999", + "pathname": "/foo.bar.org", + "search": "?type=TXT", + "hash": "" + }, + { + "input": "ldap://localhost:389/ou=People,o=JNDITutorial", + "base": null, + "href": "ldap://localhost:389/ou=People,o=JNDITutorial", + "origin": "null", + "protocol": "ldap:", + "username": "", + "password": "", + "host": "localhost:389", + "hostname": "localhost", + "port": "389", + "pathname": "/ou=People,o=JNDITutorial", + "search": "", + "hash": "" + }, + { + "input": "git+https://github.com/foo/bar", + "base": null, + "href": "git+https://github.com/foo/bar", + "origin": "null", + "protocol": "git+https:", + "username": "", + "password": "", + "host": "github.com", + "hostname": "github.com", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "urn:ietf:rfc:2648", + "base": null, + "href": "urn:ietf:rfc:2648", + "origin": "null", + "protocol": "urn:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ietf:rfc:2648", + "search": "", + "hash": "" + }, + { + "input": "tag:joe@example.org,2001:foo/bar", + "base": null, + "href": "tag:joe@example.org,2001:foo/bar", + "origin": "null", + "protocol": "tag:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "joe@example.org,2001:foo/bar", + "search": "", + "hash": "" + }, + "Serialize /. in path", + { + "input": "non-spec:/.//", + "base": null, + "href": "non-spec:/.//", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/..//", + "base": null, + "href": "non-spec:/.//", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/a/..//", + "base": null, + "href": "non-spec:/.//", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/.//path", + "base": null, + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/..//path", + "base": null, + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "non-spec:/a/..//path", + "base": null, + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "/.//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "/..//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "..//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "a/..//path", + "base": "non-spec:/p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + { + "input": "", + "base": "non-spec:/..//p", + "href": "non-spec:/.//p", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//p", + "search": "", + "hash": "" + }, + { + "input": "path", + "base": "non-spec:/..//p", + "href": "non-spec:/.//path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//path", + "search": "", + "hash": "" + }, + "Do not serialize /. in path", + { + "input": "../path", + "base": "non-spec:/.//p", + "href": "non-spec:/path", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/path", + "search": "", + "hash": "" + }, + "# percent encoded hosts in non-special-URLs", + { + "input": "non-special://%E2%80%A0/", + "base": null, + "href": "non-special://%E2%80%A0/", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "%E2%80%A0", + "hostname": "%E2%80%A0", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "non-special://H%4fSt/path", + "base": null, + "href": "non-special://H%4fSt/path", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "H%4fSt", + "hostname": "H%4fSt", + "port": "", + "pathname": "/path", + "search": "", + "hash": "" + }, + "# IPv6 in non-special-URLs", + { + "input": "non-special://[1:2:0:0:5:0:0:0]/", + "base": null, + "href": "non-special://[1:2:0:0:5::]/", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "[1:2:0:0:5::]", + "hostname": "[1:2:0:0:5::]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "non-special://[1:2:0:0:0:0:0:3]/", + "base": null, + "href": "non-special://[1:2::3]/", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "[1:2::3]", + "hostname": "[1:2::3]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "non-special://[1:2::3]:80/", + "base": null, + "href": "non-special://[1:2::3]:80/", + "protocol": "non-special:", + "username": "", + "password": "", + "host": "[1:2::3]:80", + "hostname": "[1:2::3]", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "non-special://[:80/", + "base": null, + "failure": true + }, + { + "input": "blob:https://example.com:443/", + "base": null, + "href": "blob:https://example.com:443/", + "origin": "https://example.com", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "https://example.com:443/", + "search": "", + "hash": "" + }, + { + "input": "blob:http://example.org:88/", + "base": null, + "href": "blob:http://example.org:88/", + "origin": "http://example.org:88", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "http://example.org:88/", + "search": "", + "hash": "" + }, + { + "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf", + "base": null, + "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf", + "search": "", + "hash": "" + }, + { + "input": "blob:", + "base": null, + "href": "blob:", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "", + "search": "", + "hash": "" + }, + "blob: in blob:", + { + "input": "blob:blob:", + "base": null, + "href": "blob:blob:", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blob:", + "search": "", + "hash": "" + }, + { + "input": "blob:blob:https://example.org/", + "base": null, + "href": "blob:blob:https://example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blob:https://example.org/", + "search": "", + "hash": "" + }, + "Non-http(s): in blob:", + { + "input": "blob:about:blank", + "base": null, + "href": "blob:about:blank", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "about:blank", + "search": "", + "hash": "" + }, + { + "input": "blob:file://host/path", + "base": null, + "href": "blob:file://host/path", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "file://host/path", + "search": "", + "hash": "" + }, + { + "input": "blob:ftp://host/path", + "base": null, + "href": "blob:ftp://host/path", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ftp://host/path", + "search": "", + "hash": "" + }, + { + "input": "blob:ws://example.org/", + "base": null, + "href": "blob:ws://example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ws://example.org/", + "search": "", + "hash": "" + }, + { + "input": "blob:wss://example.org/", + "base": null, + "href": "blob:wss://example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "wss://example.org/", + "search": "", + "hash": "" + }, + "Percent-encoded http: in blob:", + { + "input": "blob:http%3a//example.org/", + "base": null, + "href": "blob:http%3a//example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "http%3a//example.org/", + "search": "", + "hash": "" + }, + "Invalid IPv4 radix digits", + { + "input": "http://0x7f.0.0.0x7g", + "base": null, + "href": "http://0x7f.0.0.0x7g/", + "protocol": "http:", + "username": "", + "password": "", + "host": "0x7f.0.0.0x7g", + "hostname": "0x7f.0.0.0x7g", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://0X7F.0.0.0X7G", + "base": null, + "href": "http://0x7f.0.0.0x7g/", + "protocol": "http:", + "username": "", + "password": "", + "host": "0x7f.0.0.0x7g", + "hostname": "0x7f.0.0.0x7g", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid IPv4 portion of IPv6 address", + { + "input": "http://[::127.0.0.0.1]", + "base": null, + "failure": true + }, + "Uncompressed IPv6 addresses with 0", + { + "input": "http://[0:1:0:1:0:1:0:1]", + "base": null, + "href": "http://[0:1:0:1:0:1:0:1]/", + "protocol": "http:", + "username": "", + "password": "", + "host": "[0:1:0:1:0:1:0:1]", + "hostname": "[0:1:0:1:0:1:0:1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[1:0:1:0:1:0:1:0]", + "base": null, + "href": "http://[1:0:1:0:1:0:1:0]/", + "protocol": "http:", + "username": "", + "password": "", + "host": "[1:0:1:0:1:0:1:0]", + "hostname": "[1:0:1:0:1:0:1:0]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Percent-encoded query and fragment", + { + "input": "http://example.org/test?\u0022", + "base": null, + "href": "http://example.org/test?%22", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?%22", + "hash": "" + }, + { + "input": "http://example.org/test?\u0023", + "base": null, + "href": "http://example.org/test?#", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "http://example.org/test?\u003C", + "base": null, + "href": "http://example.org/test?%3C", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?%3C", + "hash": "" + }, + { + "input": "http://example.org/test?\u003E", + "base": null, + "href": "http://example.org/test?%3E", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?%3E", + "hash": "" + }, + { + "input": "http://example.org/test?\u2323", + "base": null, + "href": "http://example.org/test?%E2%8C%A3", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?%E2%8C%A3", + "hash": "" + }, + { + "input": "http://example.org/test?%23%23", + "base": null, + "href": "http://example.org/test?%23%23", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?%23%23", + "hash": "" + }, + { + "input": "http://example.org/test?%GH", + "base": null, + "href": "http://example.org/test?%GH", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?%GH", + "hash": "" + }, + { + "input": "http://example.org/test?a#%EF", + "base": null, + "href": "http://example.org/test?a#%EF", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?a", + "hash": "#%EF" + }, + { + "input": "http://example.org/test?a#%GH", + "base": null, + "href": "http://example.org/test?a#%GH", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?a", + "hash": "#%GH" + }, + "URLs that require a non-about:blank base. (Also serve as invalid base tests.)", + { + "input": "a", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "a/", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "a//", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + "Bases that don't fail to parse but fail to be bases", + { + "input": "test-a-colon.html", + "base": "a:", + "failure": true + }, + { + "input": "test-a-colon-b.html", + "base": "a:b", + "failure": true + }, + "Other base URL tests, that must succeed", + { + "input": "test-a-colon-slash.html", + "base": "a:/", + "href": "a:/test-a-colon-slash.html", + "protocol": "a:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test-a-colon-slash.html", + "search": "", + "hash": "" + }, + { + "input": "test-a-colon-slash-slash.html", + "base": "a://", + "href": "a:///test-a-colon-slash-slash.html", + "protocol": "a:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test-a-colon-slash-slash.html", + "search": "", + "hash": "" + }, + { + "input": "test-a-colon-slash-b.html", + "base": "a:/b", + "href": "a:/test-a-colon-slash-b.html", + "protocol": "a:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test-a-colon-slash-b.html", + "search": "", + "hash": "" + }, + { + "input": "test-a-colon-slash-slash-b.html", + "base": "a://b", + "href": "a://b/test-a-colon-slash-slash-b.html", + "protocol": "a:", + "username": "", + "password": "", + "host": "b", + "hostname": "b", + "port": "", + "pathname": "/test-a-colon-slash-slash-b.html", + "search": "", + "hash": "" + }, + "Null code point in fragment", + { + "input": "http://example.org/test?a#b\u0000c", + "base": null, + "href": "http://example.org/test?a#b%00c", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?a", + "hash": "#b%00c" + }, + { + "input": "non-spec://example.org/test?a#b\u0000c", + "base": null, + "href": "non-spec://example.org/test?a#b%00c", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/test", + "search": "?a", + "hash": "#b%00c" + }, + { + "input": "non-spec:/test?a#b\u0000c", + "base": null, + "href": "non-spec:/test?a#b%00c", + "protocol": "non-spec:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "?a", + "hash": "#b%00c" + }, + "First scheme char - not allowed: https://github.com/whatwg/url/issues/464", + { + "input": "10.0.0.7:8080/foo.html", + "base": "file:///some/dir/bar.html", + "href": "file:///some/dir/10.0.0.7:8080/foo.html", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/some/dir/10.0.0.7:8080/foo.html", + "search": "", + "hash": "" + }, + "Subsequent scheme chars - not allowed", + { + "input": "a!@$*=/foo.html", + "base": "file:///some/dir/bar.html", + "href": "file:///some/dir/a!@$*=/foo.html", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/some/dir/a!@$*=/foo.html", + "search": "", + "hash": "" + }, + "First and subsequent scheme chars - allowed", + { + "input": "a1234567890-+.:foo/bar", + "base": "http://example.com/dir/file", + "href": "a1234567890-+.:foo/bar", + "protocol": "a1234567890-+.:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "foo/bar", + "search": "", + "hash": "" + }, + "IDNA ignored code points in file URLs hosts", + { + "input": "file://a\u00ADb/p", + "base": null, + "href": "file://ab/p", + "protocol": "file:", + "username": "", + "password": "", + "host": "ab", + "hostname": "ab", + "port": "", + "pathname": "/p", + "search": "", + "hash": "" + }, + { + "input": "file://a%C2%ADb/p", + "base": null, + "href": "file://ab/p", + "protocol": "file:", + "username": "", + "password": "", + "host": "ab", + "hostname": "ab", + "port": "", + "pathname": "/p", + "search": "", + "hash": "" + }, + "IDNA hostnames which get mapped to 'localhost'", + { + "input": "file://loC𝐀𝐋𝐇𝐨𝐬𝐭/usr/bin", + "base": null, + "href": "file:///usr/bin", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/usr/bin", + "search": "", + "hash": "" + }, + "Empty host after the domain to ASCII", + { + "input": "file://\u00ad/p", + "base": null, + "failure": true + }, + { + "input": "file://%C2%AD/p", + "base": null, + "failure": true + }, + { + "input": "file://xn--/p", + "base": null, + "failure": true + }, + "https://bugzilla.mozilla.org/show_bug.cgi?id=1647058", + { + "input": "#link", + "base": "https://example.org/##link", + "href": "https://example.org/#link", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "#link" + }, + "UTF-8 percent-encode of C0 control percent-encode set and supersets", + { + "input": "non-special:cannot-be-a-base-url-\u0000\u0001\u001F\u001E\u007E\u007F\u0080", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80", + "origin": "null", + "password": "", + "pathname": "cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment", + "base": null, + "hash": "#fragment%3C%7Ffragment", + "host": "www.example.com", + "hostname": "www.example.com", + "href": "https://www.example.com/path%7B%7Fpath.html?query%27%7F=query#fragment%3C%7Ffragment", + "origin": "https://www.example.com", + "password": "", + "pathname": "/path%7B%7Fpath.html", + "port": "", + "protocol": "https:", + "search": "?query%27%7F=query", + "username": "" + }, + { + "input": "https://user:pass[\u007F@foo/bar", + "base": "http://example.org", + "hash": "", + "host": "foo", + "hostname": "foo", + "href": "https://user:pass%5B%7F@foo/bar", + "origin": "https://foo", + "password": "pass%5B%7F", + "pathname": "/bar", + "port": "", + "protocol": "https:", + "search": "", + "username": "user" + }, + "Tests for the distinct percent-encode sets", + { + "input": "foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "foo://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/", + "origin": "null", + "password": "", + "pathname": "/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~" + }, + { + "input": "wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/", + "origin": "wss://host", + "password": "", + "pathname": "/", + "port":"", + "protocol": "wss:", + "search": "", + "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~" + }, + { + "input": "foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "foo://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/", + "origin": "null", + "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~", + "pathname": "/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "joe" + }, + { + "input": "wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/", + "origin": "wss://host", + "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~", + "pathname": "/", + "port":"", + "protocol": "wss:", + "search": "", + "username": "joe" + }, + { + "input": "foo://!\"$%&'()*+,-.;=_`{}~/", + "base": null, + "hash": "", + "host": "!\"$%&'()*+,-.;=_`{}~", + "hostname": "!\"$%&'()*+,-.;=_`{}~", + "href":"foo://!\"$%&'()*+,-.;=_`{}~/", + "origin": "null", + "password": "", + "pathname": "/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "" + }, + { + "input": "wss://!\"$&'()*+,-.;=_`{}~/", + "base": null, + "hash": "", + "host": "!\"$&'()*+,-.;=_`{}~", + "hostname": "!\"$&'()*+,-.;=_`{}~", + "href":"wss://!\"$&'()*+,-.;=_`{}~/", + "origin": "wss://!\"$&'()*+,-.;=_`{}~", + "password": "", + "pathname": "/", + "port":"", + "protocol": "wss:", + "search": "", + "username": "" + }, + { + "input": "foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~", + "origin": "null", + "password": "", + "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~", + "port":"", + "protocol": "foo:", + "search": "", + "username": "" + }, + { + "input": "wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~", + "origin": "wss://host", + "password": "", + "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~", + "port":"", + "protocol": "wss:", + "search": "", + "username": "" + }, + { + "input": "foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "foo://host/dir/?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~", + "origin": "null", + "password": "", + "pathname": "/dir/", + "port":"", + "protocol": "foo:", + "search": "?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~", + "username": "" + }, + { + "input": "wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~", + "base": null, + "hash": "", + "host": "host", + "hostname": "host", + "href": "wss://host/dir/?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~", + "origin": "wss://host", + "password": "", + "pathname": "/dir/", + "port":"", + "protocol": "wss:", + "search": "?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~", + "username": "" + }, + { + "input": "foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", + "base": null, + "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", + "host": "host", + "hostname": "host", + "href": "foo://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", + "origin": "null", + "password": "", + "pathname": "/dir/", + "port":"", + "protocol": "foo:", + "search": "", + "username": "" + }, + { + "input": "wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", + "base": null, + "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", + "host": "host", + "hostname": "host", + "href": "wss://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~", + "origin": "wss://host", + "password": "", + "pathname": "/dir/", + "port":"", + "protocol": "wss:", + "search": "", + "username": "" + }, + "Ensure that input schemes are not ignored when resolving non-special URLs", + { + "input": "abc:rootless", + "base": "abc://host/path", + "hash": "", + "host": "", + "hostname": "", + "href":"abc:rootless", + "password": "", + "pathname": "rootless", + "port":"", + "protocol": "abc:", + "search": "", + "username": "" + }, + { + "input": "abc:rootless", + "base": "abc:/path", + "hash": "", + "host": "", + "hostname": "", + "href":"abc:rootless", + "password": "", + "pathname": "rootless", + "port":"", + "protocol": "abc:", + "search": "", + "username": "" + }, + { + "input": "abc:rootless", + "base": "abc:path", + "hash": "", + "host": "", + "hostname": "", + "href":"abc:rootless", + "password": "", + "pathname": "rootless", + "port":"", + "protocol": "abc:", + "search": "", + "username": "" + }, + { + "input": "abc:/rooted", + "base": "abc://host/path", + "hash": "", + "host": "", + "hostname": "", + "href":"abc:/rooted", + "password": "", + "pathname": "/rooted", + "port":"", + "protocol": "abc:", + "search": "", + "username": "" + }, + "Empty query and fragment with blank should throw an error", + { + "input": "#", + "base": null, + "failure": true, + "relativeTo": "any-base" + }, + { + "input": "?", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + "Last component looks like a number, but not valid IPv4", + { + "input": "http://1.2.3.4.5", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://1.2.3.4.5.", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://0..0x300/", + "base": null, + "failure": true + }, + { + "input": "http://0..0x300./", + "base": null, + "failure": true + }, + { + "input": "http://256.256.256.256.256", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://256.256.256.256.256.", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://1.2.3.08", + "base": null, + "failure": true + }, + { + "input": "http://1.2.3.08.", + "base": null, + "failure": true + }, + { + "input": "http://1.2.3.09", + "base": null, + "failure": true + }, + { + "input": "http://09.2.3.4", + "base": null, + "failure": true + }, + { + "input": "http://09.2.3.4.", + "base": null, + "failure": true + }, + { + "input": "http://01.2.3.4.5", + "base": null, + "failure": true + }, + { + "input": "http://01.2.3.4.5.", + "base": null, + "failure": true + }, + { + "input": "http://0x100.2.3.4", + "base": null, + "failure": true + }, + { + "input": "http://0x100.2.3.4.", + "base": null, + "failure": true + }, + { + "input": "http://0x1.2.3.4.5", + "base": null, + "failure": true + }, + { + "input": "http://0x1.2.3.4.5.", + "base": null, + "failure": true + }, + { + "input": "http://foo.1.2.3.4", + "base": null, + "failure": true + }, + { + "input": "http://foo.1.2.3.4.", + "base": null, + "failure": true + }, + { + "input": "http://foo.2.3.4", + "base": null, + "failure": true + }, + { + "input": "http://foo.2.3.4.", + "base": null, + "failure": true + }, + { + "input": "http://foo.09", + "base": null, + "failure": true + }, + { + "input": "http://foo.09.", + "base": null, + "failure": true + }, + { + "input": "http://foo.0x4", + "base": null, + "failure": true + }, + { + "input": "http://foo.0x4.", + "base": null, + "failure": true + }, + { + "input": "http://foo.09..", + "base": null, + "hash": "", + "host": "foo.09..", + "hostname": "foo.09..", + "href":"http://foo.09../", + "password": "", + "pathname": "/", + "port":"", + "protocol": "http:", + "search": "", + "username": "" + }, + { + "input": "http://0999999999999999999/", + "base": null, + "failure": true + }, + { + "input": "http://foo.0x", + "base": null, + "failure": true + }, + { + "input": "http://foo.0XFfFfFfFfFfFfFfFfFfAcE123", + "base": null, + "failure": true + }, + { + "input": "http://💩.123/", + "base": null, + "failure": true + }, + "U+0000 and U+FFFF in various places", + { + "input": "https://\u0000y", + "base": null, + "failure": true + }, + { + "input": "https://x/\u0000y", + "base": null, + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/%00y", + "password": "", + "pathname": "/%00y", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://x/?\u0000y", + "base": null, + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/?%00y", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "?%00y", + "username": "" + }, + { + "input": "https://x/?#\u0000y", + "base": null, + "hash": "#%00y", + "host": "x", + "hostname": "x", + "href": "https://x/?#%00y", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://\uFFFFy", + "base": null, + "failure": true + }, + { + "input": "https://x/\uFFFFy", + "base": null, + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/%EF%BF%BFy", + "password": "", + "pathname": "/%EF%BF%BFy", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://x/?\uFFFFy", + "base": null, + "hash": "", + "host": "x", + "hostname": "x", + "href": "https://x/?%EF%BF%BFy", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "?%EF%BF%BFy", + "username": "" + }, + { + "input": "https://x/?#\uFFFFy", + "base": null, + "hash": "#%EF%BF%BFy", + "host": "x", + "hostname": "x", + "href": "https://x/?#%EF%BF%BFy", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "non-special:\u0000y", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:%00y", + "password": "", + "pathname": "%00y", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/\u0000y", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/%00y", + "password": "", + "pathname": "x/%00y", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/?\u0000y", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/?%00y", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "?%00y", + "username": "" + }, + { + "input": "non-special:x/?#\u0000y", + "base": null, + "hash": "#%00y", + "host": "", + "hostname": "", + "href": "non-special:x/?#%00y", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:\uFFFFy", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:%EF%BF%BFy", + "password": "", + "pathname": "%EF%BF%BFy", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/\uFFFFy", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/%EF%BF%BFy", + "password": "", + "pathname": "x/%EF%BF%BFy", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "non-special:x/?\uFFFFy", + "base": null, + "hash": "", + "host": "", + "hostname": "", + "href": "non-special:x/?%EF%BF%BFy", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "?%EF%BF%BFy", + "username": "" + }, + { + "input": "non-special:x/?#\uFFFFy", + "base": null, + "hash": "#%EF%BF%BFy", + "host": "", + "hostname": "", + "href": "non-special:x/?#%EF%BF%BFy", + "password": "", + "pathname": "x/", + "port": "", + "protocol": "non-special:", + "search": "", + "username": "" + }, + { + "input": "", + "base": null, + "failure": true, + "relativeTo": "non-opaque-path-base" + }, + { + "input": "https://example.com/\"quoted\"", + "base": null, + "hash": "", + "host": "example.com", + "hostname": "example.com", + "href": "https://example.com/%22quoted%22", + "origin": "https://example.com", + "password": "", + "pathname": "/%22quoted%22", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "input": "https://a%C2%ADb/", + "base": null, + "hash": "", + "host": "ab", + "hostname": "ab", + "href": "https://ab/", + "origin": "https://ab", + "password": "", + "pathname": "/", + "port": "", + "protocol": "https:", + "search": "", + "username": "" + }, + { + "comment": "Empty host after domain to ASCII", + "input": "https://\u00AD/", + "base": null, + "failure": true + }, + { + "input": "https://%C2%AD/", + "base": null, + "failure": true + }, + { + "input": "https://xn--/", + "base": null, + "failure": true + }, + "Non-special schemes that some implementations might incorrectly treat as special", + { + "input": "data://example.com:8080/pathname?search#hash", + "base": null, + "href": "data://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "data:///test", + "base": null, + "href": "data:///test", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "data://test/a/../b", + "base": null, + "href": "data://test/b", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "data://:443", + "base": null, + "failure": true + }, + { + "input": "data://test:test", + "base": null, + "failure": true + }, + { + "input": "data://[:1]", + "base": null, + "failure": true + }, + { + "input": "javascript://example.com:8080/pathname?search#hash", + "base": null, + "href": "javascript://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "javascript:///test", + "base": null, + "href": "javascript:///test", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "javascript://test/a/../b", + "base": null, + "href": "javascript://test/b", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "javascript://:443", + "base": null, + "failure": true + }, + { + "input": "javascript://test:test", + "base": null, + "failure": true + }, + { + "input": "javascript://[:1]", + "base": null, + "failure": true + }, + { + "input": "mailto://example.com:8080/pathname?search#hash", + "base": null, + "href": "mailto://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "mailto:///test", + "base": null, + "href": "mailto:///test", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "mailto://test/a/../b", + "base": null, + "href": "mailto://test/b", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "mailto://:443", + "base": null, + "failure": true + }, + { + "input": "mailto://test:test", + "base": null, + "failure": true + }, + { + "input": "mailto://[:1]", + "base": null, + "failure": true + }, + { + "input": "intent://example.com:8080/pathname?search#hash", + "base": null, + "href": "intent://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "intent:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "intent:///test", + "base": null, + "href": "intent:///test", + "origin": "null", + "protocol": "intent:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "intent://test/a/../b", + "base": null, + "href": "intent://test/b", + "origin": "null", + "protocol": "intent:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "intent://:443", + "base": null, + "failure": true + }, + { + "input": "intent://test:test", + "base": null, + "failure": true + }, + { + "input": "intent://[:1]", + "base": null, + "failure": true + }, + { + "input": "urn://example.com:8080/pathname?search#hash", + "base": null, + "href": "urn://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "urn:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "urn:///test", + "base": null, + "href": "urn:///test", + "origin": "null", + "protocol": "urn:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "urn://test/a/../b", + "base": null, + "href": "urn://test/b", + "origin": "null", + "protocol": "urn:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "urn://:443", + "base": null, + "failure": true + }, + { + "input": "urn://test:test", + "base": null, + "failure": true + }, + { + "input": "urn://[:1]", + "base": null, + "failure": true + }, + { + "input": "turn://example.com:8080/pathname?search#hash", + "base": null, + "href": "turn://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "turn:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "turn:///test", + "base": null, + "href": "turn:///test", + "origin": "null", + "protocol": "turn:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "turn://test/a/../b", + "base": null, + "href": "turn://test/b", + "origin": "null", + "protocol": "turn:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "turn://:443", + "base": null, + "failure": true + }, + { + "input": "turn://test:test", + "base": null, + "failure": true + }, + { + "input": "turn://[:1]", + "base": null, + "failure": true + }, + { + "input": "stun://example.com:8080/pathname?search#hash", + "base": null, + "href": "stun://example.com:8080/pathname?search#hash", + "origin": "null", + "protocol": "stun:", + "username": "", + "password": "", + "host": "example.com:8080", + "hostname": "example.com", + "port": "8080", + "pathname": "/pathname", + "search": "?search", + "hash": "#hash" + }, + { + "input": "stun:///test", + "base": null, + "href": "stun:///test", + "origin": "null", + "protocol": "stun:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "stun://test/a/../b", + "base": null, + "href": "stun://test/b", + "origin": "null", + "protocol": "stun:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/b", + "search": "", + "hash": "" + }, + { + "input": "stun://:443", + "base": null, + "failure": true + }, + { + "input": "stun://test:test", + "base": null, + "failure": true + }, + { + "input": "stun://[:1]", + "base": null, + "failure": true + }, + { + "input": "w://x:0", + "base": null, + "href": "w://x:0", + "origin": "null", + "protocol": "w:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + { + "input": "west://x:0", + "base": null, + "href": "west://x:0", + "origin": "null", + "protocol": "west:", + "username": "", + "password": "", + "host": "x:0", + "hostname": "x", + "port": "0", + "pathname": "", + "search": "", + "hash": "" + }, + "Scheme relative path starting with multiple slashes", + { + "input": "///test", + "base": "http://example.org/", + "href": "http://test/", + "protocol": "http:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///\\//\\//test", + "base": "http://example.org/", + "href": "http://test/", + "protocol": "http:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///example.org/path", + "base": "http://example.org/", + "href": "http://example.org/path", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/path", + "search": "", + "hash": "" + }, + { + "input": "///example.org/../path", + "base": "http://example.org/", + "href": "http://example.org/path", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/path", + "search": "", + "hash": "" + }, + { + "input": "///example.org/../../", + "base": "http://example.org/", + "href": "http://example.org/", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///example.org/../path/../../", + "base": "http://example.org/", + "href": "http://example.org/", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///example.org/../path/../../path", + "base": "http://example.org/", + "href": "http://example.org/path", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/path", + "search": "", + "hash": "" + }, + { + "input": "/\\/\\//example.org/../path", + "base": "http://example.org/", + "href": "http://example.org/path", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/path", + "search": "", + "hash": "" + }, + { + "input": "///abcdef/../", + "base": "file:///", + "href": "file:///", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "/\\//\\/a/../", + "base": "file:///", + "href": "file://////", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "////", + "search": "", + "hash": "" + }, + { + "input": "//a/../", + "base": "file:///", + "href": "file://a/", + "protocol": "file:", + "username": "", + "password": "", + "host": "a", + "hostname": "a", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + } +] diff --git a/testing/web-platform/tests/url/toascii.window.js b/testing/web-platform/tests/url/toascii.window.js new file mode 100644 index 0000000000..cdc488ec28 --- /dev/null +++ b/testing/web-platform/tests/url/toascii.window.js @@ -0,0 +1,54 @@ +promise_test(() => fetch("resources/toascii.json").then(res => res.json()).then(runTests), "Loading data…"); + +function makeURL(type, input) { + input = "https://" + input + "/x" + if(type === "url") { + return new URL(input) + } else { + const url = document.createElement(type) + url.href = input + return url + } +} + +function runTests(tests) { + for(var i = 0, l = tests.length; i < l; i++) { + let hostTest = tests[i] + if (typeof hostTest === "string") { + continue // skip comments + } + const typeName = { "url": "URL", "a": "<a>", "area": "<area>" } + ;["url", "a", "area"].forEach((type) => { + test(() => { + if(hostTest.output !== null) { + const url = makeURL("url", hostTest.input) + assert_equals(url.host, hostTest.output) + assert_equals(url.hostname, hostTest.output) + assert_equals(url.pathname, "/x") + assert_equals(url.href, "https://" + hostTest.output + "/x") + } else { + if(type === "url") { + assert_throws_js(TypeError, () => makeURL("url", hostTest.input)) + } else { + const url = makeURL(type, hostTest.input) + assert_equals(url.host, "") + assert_equals(url.hostname, "") + assert_equals(url.pathname, "") + assert_equals(url.href, "https://" + hostTest.input + "/x") + } + } + }, hostTest.input + " (using " + typeName[type] + ")") + ;["host", "hostname"].forEach((val) => { + test(() => { + const url = makeURL(type, "x") + url[val] = hostTest.input + if(hostTest.output !== null) { + assert_equals(url[val], hostTest.output) + } else { + assert_equals(url[val], "x") + } + }, hostTest.input + " (using " + typeName[type] + "." + val + ")") + }) + }) + } +} diff --git a/testing/web-platform/tests/url/tools/IdnaTestV2-parser.py b/testing/web-platform/tests/url/tools/IdnaTestV2-parser.py new file mode 100644 index 0000000000..e4154f0ee8 --- /dev/null +++ b/testing/web-platform/tests/url/tools/IdnaTestV2-parser.py @@ -0,0 +1,174 @@ +# This script can convert IdnaTestV2.txt to JSON, accounting for the requirements in the +# URL Standard. +# +# The goal is to eventually remove --exclude-std3 and --exclude-bidi. For that we need solutions to +# these issues: +# +# * https://github.com/whatwg/url/issues/341 +# * https://github.com/whatwg/url/issues/543 +# * https://github.com/whatwg/url/issues/733 +# * https://github.com/whatwg/url/issues/744 +# +# Removal of --exclude-ipv4-like is a stretch goal also dependent upon those issues. + +import argparse +import json +import os +import re +import requests + +def get_IdnaTestV2_lines(): + IdnaTestV2 = os.path.join(os.path.dirname(__file__), "IdnaTestV2.txt") + if not os.path.exists(IdnaTestV2): + # Download IdnaTestV2.txt if it doesn't exist yet + open(IdnaTestV2, "w").write(requests.get("https://unicode.org/Public/idna/latest/IdnaTestV2.txt").text) + return open(IdnaTestV2, "r").readlines() + +def remove_escapes(input): + return json.loads("\"" + input + "\"") + +def ends_in_a_number(input): + # This method is not robust. It uses https://www.unicode.org/reports/tr46/#Notation but there + # are likely other ways to end up with a dot, e.g., through decomposition or percent-decoding. + # It also does not entirely match https://url.spec.whatwg.org/#ends-in-a-number-checker. It + # appears to suffice for the tests in question though. + parts = re.split(r"\u002E|\uFF0E|\u3002|\uFF61", input) + if not parts: + return False + if parts[-1] == "": + if len(parts) == 1: + return False + parts.pop() + return parts[-1].isascii() and parts[-1].isdigit() + +def contains_bidi_status(statuses): + for status in statuses: + if status in ["B1", "B2", "B3", "B4", "B5", "B6"]: + return True + return False + +def parse(lines, exclude_ipv4_like, exclude_std3, exclude_bidi): + # Main quest. + output = ["THIS IS A GENERATED FILE. PLEASE DO NOT MODIFY DIRECTLY. See ../tools/IdnaTestV2-parser.py instead."] + output.append(f"--exclude-ipv4-like: {exclude_ipv4_like}; --exclude-std3: {exclude_std3}; --exclude_bidi: {exclude_bidi}") + + # Side quest. + unique_statuses = [] + + for line in lines: + # Remove newlines + line = line.rstrip() + + # Remove lines that are comments or empty + if line.startswith("#") or line == "": + continue + + # Remove escapes (doesn't handle \x{XXXX} but those do not appear in the source) + line = remove_escapes(line) + + # Normalize columns + # + # Since we are only interested in ToASCII and enforce Transitional_Processing=false we care + # about the following columns: + # + # * Column 1 (source) + # * Column 4 (toAsciiN) + # * Column 5 (toAsciiNStatus) + # + # We also store Column 2 (toUnicode) to help with UseSTD3ASCIIRules exclusion. + columns = [column.strip() for column in line.split(";")] + + # Column 1 (source) and Column 2 (toUnicode; if empty, Column 1 (source)) + source = columns[0] + to_unicode = columns[1] + if to_unicode == "": + to_unicode = source + + # Immediately exclude IPv4-like tests when desired. While we could force all their + # expectations to be failure instead, it's not clear we need that many additional tests that + # were actually trying to test something else. + if exclude_ipv4_like: + if ends_in_a_number(source): + continue + + if exclude_std3: + if re.search(r"\u2260|\u226E|\u226F|\<|\>|\$|,", to_unicode): + continue + + # Column 4 (toAsciiN; if empty, use Column 2 (toUnicode)) + to_ascii = columns[3] + if to_ascii == "": + to_ascii = to_unicode + + # Column 5 (toAsciiNStatus; if empty, use Column 3 (toUnicodeStatus)) + temp_statuses = columns[4] + if temp_statuses == "": + temp_statuses = columns[2] + + statuses = [] + if temp_statuses != "": + assert temp_statuses.startswith("[") + statuses = [status.strip() for status in temp_statuses[1:-1].split(",")] + + # Side quest time. + for status in statuses: + if status not in unique_statuses: + unique_statuses.append(status) + + # The URL Standard has + # + # * UseSTD3ASCIIRules=false; however there are no tests marked U1 (some should be though) + # * CheckHyphens=false; thus ignore V2, V3? + # * VerifyDnsLength=false; thus ignore A4_1 and A4_2 + ignored_statuses = [] + for status in statuses: + if status in ["A4_1", "A4_2", "U1", "V2", "V3"]: + ignored_statuses.append(status) + for status in ignored_statuses: + statuses.remove(status) + + if exclude_bidi and contains_bidi_status(statuses): + continue + + if len(statuses) > 0: + to_ascii = None + + test = { "input": source, "output": to_ascii } + comment = "" + for status in statuses: + comment += status + "; " + for status in ignored_statuses: + comment += status + " (ignored); " + if comment != "": + test["comment"] = comment.strip()[:-1] + output.append(test) + + unique_statuses.sort() + return { "tests": output, "unique_statuses": unique_statuses } + +def to_json(data): + handle = open(os.path.join(os.path.dirname(__file__), "../resources/IdnaTestV2.json"), "w") + handle.write(json.dumps(data, sort_keys=True, allow_nan=False, indent=2, separators=(',', ': '))) + handle.write("\n") + handle.close() + +def main(): + parser = argparse.ArgumentParser(epilog="Thanks for caring about IDNA!") + parser.add_argument("--generate", action="store_true", help="Generate the JSON resource.") + parser.add_argument("--exclude-ipv4-like", action="store_true", help="Exclude inputs that end with an ASCII digit label. (Not robust, but works for current input.)") + parser.add_argument("--exclude-std3", action="store_true", help="Exclude tests impacted by UseSTD3ASCIIRules. (Not robust, but works for current input.)") + parser.add_argument("--exclude-bidi", action="store_true", help="Exclude tests impacted by CheckBidi.") + parser.add_argument("--statuses", action="store_true", help="Print the unique statuses in IdnaTestV2.txt.") + args = parser.parse_args() + + if args.generate or args.statuses: + output = parse(get_IdnaTestV2_lines(), args.exclude_ipv4_like, args.exclude_std3, args.exclude_bidi) + if args.statuses: + print(output["unique_statuses"]) + else: + assert args.generate + to_json(output["tests"]) + else: + parser.print_usage() + +main() diff --git a/testing/web-platform/tests/url/url-constructor.any.js b/testing/web-platform/tests/url/url-constructor.any.js new file mode 100644 index 0000000000..bea06d025b --- /dev/null +++ b/testing/web-platform/tests/url/url-constructor.any.js @@ -0,0 +1,53 @@ +// META: script=/common/subset-tests-by-key.js +// META: timeout=long +// META: variant=?include=file +// META: variant=?include=javascript +// META: variant=?include=mailto +// META: variant=?exclude=(file|javascript|mailto) + +function runURLTests(urlTests) { + for (const expected of urlTests) { + // Skip comments + if (typeof expected === "string") + continue; + + const base = expected.base !== null ? expected.base : undefined; + + function getKey(expected) { + if (expected.protocol) { + return expected.protocol.replace(":", ""); + } + if (expected.failure) { + return expected.input.split(":")[0]; + } + return "other"; + } + + subsetTestByKey(getKey(expected), test, function() { + if (expected.failure) { + assert_throws_js(TypeError, function() { + new URL(expected.input, base); + }); + return; + } + + const url = new URL(expected.input, base); + assert_equals(url.href, expected.href, "href") + assert_equals(url.protocol, expected.protocol, "protocol") + assert_equals(url.username, expected.username, "username") + assert_equals(url.password, expected.password, "password") + assert_equals(url.host, expected.host, "host") + assert_equals(url.hostname, expected.hostname, "hostname") + assert_equals(url.port, expected.port, "port") + assert_equals(url.pathname, expected.pathname, "pathname") + assert_equals(url.search, expected.search, "search") + if ("searchParams" in expected) { + assert_true("searchParams" in url) + assert_equals(url.searchParams.toString(), expected.searchParams, "searchParams") + } + assert_equals(url.hash, expected.hash, "hash") + }, `Parsing: <${expected.input}> ${base ? "against <" + base + ">" : "without base"}`) + } +} + +promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); diff --git a/testing/web-platform/tests/url/url-origin.any.js b/testing/web-platform/tests/url/url-origin.any.js new file mode 100644 index 0000000000..599984c6c1 --- /dev/null +++ b/testing/web-platform/tests/url/url-origin.any.js @@ -0,0 +1,16 @@ +promise_test(() => fetch("resources/urltestdata.json").then(res => res.json()).then(runURLTests), "Loading data…"); + +function runURLTests(urlTests) { + for (const expected of urlTests) { + // Skip comments and tests without "origin" expectation + if (typeof expected === "string" || !("origin" in expected)) + continue; + + const base = expected.base !== null ? expected.base : undefined; + + test(() => { + const url = new URL(expected.input, base); + assert_equals(url.origin, expected.origin, "origin"); + }, `Origin parsing: <${expected.input}> ${base ? "against <" + base + ">" : "without base"}`); + } +} diff --git a/testing/web-platform/tests/url/url-searchparams.any.js b/testing/web-platform/tests/url/url-searchparams.any.js new file mode 100644 index 0000000000..9bba12e89c --- /dev/null +++ b/testing/web-platform/tests/url/url-searchparams.any.js @@ -0,0 +1,72 @@ +function bURL(url, base) { + return new URL(url, base || "about:blank") +} + +function runURLSearchParamTests() { + test(function() { + var url = bURL('http://example.org/?a=b') + assert_true("searchParams" in url) + var searchParams = url.searchParams + assert_equals(url.searchParams, searchParams, 'Object identity should hold.') + }, 'URL.searchParams getter') + + test(function() { + var url = bURL('http://example.org/?a=b') + assert_true("searchParams" in url) + var searchParams = url.searchParams + assert_equals(searchParams.toString(), 'a=b') + + searchParams.set('a', 'b') + assert_equals(url.searchParams.toString(), 'a=b') + assert_equals(url.search, '?a=b') + url.search = '' + assert_equals(url.searchParams.toString(), '') + assert_equals(url.search, '') + assert_equals(searchParams.toString(), '') + }, 'URL.searchParams updating, clearing') + + test(function() { + 'use strict' + var urlString = 'http://example.org' + var url = bURL(urlString) + assert_throws_js(TypeError, function() { url.searchParams = new URLSearchParams(urlString) }) + }, 'URL.searchParams setter, invalid values') + + test(function() { + var url = bURL('http://example.org/file?a=b&c=d') + assert_true("searchParams" in url) + var searchParams = url.searchParams + assert_equals(url.search, '?a=b&c=d') + assert_equals(searchParams.toString(), 'a=b&c=d') + + // Test that setting 'search' propagates to the URL object's query object. + url.search = 'e=f&g=h' + assert_equals(url.search, '?e=f&g=h') + assert_equals(searchParams.toString(), 'e=f&g=h') + + // ..and same but with a leading '?'. + url.search = '?e=f&g=h' + assert_equals(url.search, '?e=f&g=h') + assert_equals(searchParams.toString(), 'e=f&g=h') + + // And in the other direction, altering searchParams propagates + // back to 'search'. + searchParams.append('i', ' j ') + assert_equals(url.search, '?e=f&g=h&i=+j+') + assert_equals(url.searchParams.toString(), 'e=f&g=h&i=+j+') + assert_equals(searchParams.get('i'), ' j ') + + searchParams.set('e', 'updated') + assert_equals(url.search, '?e=updated&g=h&i=+j+') + assert_equals(searchParams.get('e'), 'updated') + + var url2 = bURL('http://example.org/file??a=b&c=d') + assert_equals(url2.search, '??a=b&c=d') + assert_equals(url2.searchParams.toString(), '%3Fa=b&c=d') + + url2.href = 'http://example.org/file??a=b' + assert_equals(url2.search, '??a=b') + assert_equals(url2.searchParams.toString(), '%3Fa=b') + }, 'URL.searchParams and URL.search setters, update propagation') +} +runURLSearchParamTests() diff --git a/testing/web-platform/tests/url/url-setters-a-area.window.js b/testing/web-platform/tests/url/url-setters-a-area.window.js new file mode 100644 index 0000000000..6a5e762cd4 --- /dev/null +++ b/testing/web-platform/tests/url/url-setters-a-area.window.js @@ -0,0 +1,43 @@ +// META: script=/common/subset-tests-by-key.js +// META: variant=?include=file +// META: variant=?include=javascript +// META: variant=?include=mailto +// META: variant=?exclude=(file|javascript|mailto) + +// Keep this file in sync with url-setters.any.js. + +promise_test(() => fetch("resources/setters_tests.json").then(res => res.json()).then(runURLSettersTests), "Loading data…"); + +function runURLSettersTests(all_test_cases) { + for (var attribute_to_be_set in all_test_cases) { + if (attribute_to_be_set == "comment") { + continue; + } + var test_cases = all_test_cases[attribute_to_be_set]; + for(var i = 0, l = test_cases.length; i < l; i++) { + var test_case = test_cases[i]; + var name = "Setting <" + test_case.href + ">." + attribute_to_be_set + + " = '" + test_case.new_value + "'"; + if ("comment" in test_case) { + name += " " + test_case.comment; + } + const key = test_case.href.split(":")[0]; + subsetTestByKey(key, test, function() { + var url = document.createElement("a"); + url.href = test_case.href; + url[attribute_to_be_set] = test_case.new_value; + for (var attribute in test_case.expected) { + assert_equals(url[attribute], test_case.expected[attribute]) + } + }, "<a>: " + name) + subsetTestByKey(key, test, function() { + var url = document.createElement("area"); + url.href = test_case.href; + url[attribute_to_be_set] = test_case.new_value; + for (var attribute in test_case.expected) { + assert_equals(url[attribute], test_case.expected[attribute]) + } + }, "<area>: " + name) + } + } +} diff --git a/testing/web-platform/tests/url/url-setters-stripping.any.js b/testing/web-platform/tests/url/url-setters-stripping.any.js new file mode 100644 index 0000000000..ac90cc17e0 --- /dev/null +++ b/testing/web-platform/tests/url/url-setters-stripping.any.js @@ -0,0 +1,125 @@ +function urlString({ scheme = "https", + username = "username", + password = "password", + host = "host", + port = "8000", + pathname = "path", + search = "query", + hash = "fragment" }) { + return `${scheme}://${username}:${password}@${host}:${port}/${pathname}?${search}#${hash}`; +} + +function urlRecord(scheme) { + return new URL(urlString({ scheme })); +} + +for(const scheme of ["https", "wpt++"]) { + for(let i = 0; i < 0x20; i++) { + const stripped = i === 0x09 || i === 0x0A || i === 0x0D; + + // It turns out that user agents are surprisingly similar for these ranges so generate fewer + // tests. If this is changed also change the logic for host below. + if (i !== 0 && i !== 0x1F && !stripped) { + continue; + } + + const cpString = String.fromCodePoint(i); + const cpReference = "U+" + i.toString(16).toUpperCase().padStart(4, "0"); + + test(() => { + const expected = scheme === "https" ? (stripped ? "http" : "https") : (stripped ? "wpt--" : "wpt++"); + const url = urlRecord(scheme); + url.protocol = String.fromCodePoint(i) + (scheme === "https" ? "http" : "wpt--"); + assert_equals(url.protocol, expected + ":", "property"); + assert_equals(url.href, urlString({ scheme: expected }), "href"); + }, `Setting protocol with leading ${cpReference} (${scheme}:)`); + + test(() => { + const expected = scheme === "https" ? (stripped ? "http" : "https") : (stripped ? "wpt--" : "wpt++"); + const url = urlRecord(scheme); + url.protocol = (scheme === "https" ? "http" : "wpt--") + String.fromCodePoint(i); + assert_equals(url.protocol, expected + ":", "property"); + assert_equals(url.href, urlString({ scheme: expected }), "href"); + }, `Setting protocol with ${cpReference} before inserted colon (${scheme}:)`); + + // Cannot test protocol with trailing as the algorithm inserts a colon before proceeding + + // These do no stripping + for (const property of ["username", "password"]) { + for (const [type, expected, input] of [ + ["leading", encodeURIComponent(cpString) + "test", String.fromCodePoint(i) + "test"], + ["middle", "te" + encodeURIComponent(cpString) + "st", "te" + String.fromCodePoint(i) + "st"], + ["trailing", "test" + encodeURIComponent(cpString), "test" + String.fromCodePoint(i)] + ]) { + test(() => { + const url = urlRecord(scheme); + url[property] = input; + assert_equals(url[property], expected, "property"); + assert_equals(url.href, urlString({ scheme, [property]: expected }), "href"); + }, `Setting ${property} with ${type} ${cpReference} (${scheme}:)`); + } + } + + for (const [type, expectedPart, input] of [ + ["leading", (scheme === "https" ? cpString : encodeURIComponent(cpString)) + "test", String.fromCodePoint(i) + "test"], + ["middle", "te" + (scheme === "https" ? cpString : encodeURIComponent(cpString)) + "st", "te" + String.fromCodePoint(i) + "st"], + ["trailing", "test" + (scheme === "https" ? cpString : encodeURIComponent(cpString)), "test" + String.fromCodePoint(i)] + ]) { + test(() => { + const expected = i === 0x00 || (scheme === "https" && i === 0x1F) ? "host" : stripped ? "test" : expectedPart; + const url = urlRecord(scheme); + url.host = input; + assert_equals(url.host, expected + ":8000", "property"); + assert_equals(url.href, urlString({ scheme, host: expected }), "href"); + }, `Setting host with ${type} ${cpReference} (${scheme}:)`); + + test(() => { + const expected = i === 0x00 || (scheme === "https" && i === 0x1F) ? "host" : stripped ? "test" : expectedPart; + const url = urlRecord(scheme); + url.hostname = input; + assert_equals(url.hostname, expected, "property"); + assert_equals(url.href, urlString({ scheme, host: expected }), "href"); + }, `Setting hostname with ${type} ${cpReference} (${scheme}:)`); + } + + test(() => { + const expected = stripped ? "9000" : "8000"; + const url = urlRecord(scheme); + url.port = String.fromCodePoint(i) + "9000"; + assert_equals(url.port, expected, "property"); + assert_equals(url.href, urlString({ scheme, port: expected }), "href"); + }, `Setting port with leading ${cpReference} (${scheme}:)`); + + test(() => { + const expected = stripped ? "9000" : "90"; + const url = urlRecord(scheme); + url.port = "90" + String.fromCodePoint(i) + "00"; + assert_equals(url.port, expected, "property"); + assert_equals(url.href, urlString({ scheme, port: expected }), "href"); + }, `Setting port with middle ${cpReference} (${scheme}:)`); + + test(() => { + const expected = "9000"; + const url = urlRecord(scheme); + url.port = "9000" + String.fromCodePoint(i); + assert_equals(url.port, expected, "property"); + assert_equals(url.href, urlString({ scheme, port: expected }), "href"); + }, `Setting port with trailing ${cpReference} (${scheme}:)`); + + for (const [property, separator] of [["pathname", "/"], ["search", "?"], ["hash", "#"]]) { + for (const [type, expectedPart, input] of [ + ["leading", encodeURIComponent(cpString) + "test", String.fromCodePoint(i) + "test"], + ["middle", "te" + encodeURIComponent(cpString) + "st", "te" + String.fromCodePoint(i) + "st"], + ["trailing", "test" + encodeURIComponent(cpString), "test" + String.fromCodePoint(i)] + ]) { + test(() => { + const expected = stripped ? "test" : expectedPart; + const url = urlRecord(scheme); + url[property] = input; + assert_equals(url[property], separator + expected, "property"); + assert_equals(url.href, urlString({ scheme, [property]: expected }), "href"); + }, `Setting ${property} with ${type} ${cpReference} (${scheme}:)`); + } + } + } +} diff --git a/testing/web-platform/tests/url/url-setters.any.js b/testing/web-platform/tests/url/url-setters.any.js new file mode 100644 index 0000000000..fe88175ac6 --- /dev/null +++ b/testing/web-platform/tests/url/url-setters.any.js @@ -0,0 +1,34 @@ +// META: script=/common/subset-tests-by-key.js +// META: variant=?include=file +// META: variant=?include=javascript +// META: variant=?include=mailto +// META: variant=?exclude=(file|javascript|mailto) + +// Keep this file in sync with url-setters-a-area.window.js. + +promise_test(() => fetch("resources/setters_tests.json").then(res => res.json()).then(runURLSettersTests), "Loading data…"); + +function runURLSettersTests(all_test_cases) { + for (var attribute_to_be_set in all_test_cases) { + if (attribute_to_be_set == "comment") { + continue; + } + var test_cases = all_test_cases[attribute_to_be_set]; + for(var i = 0, l = test_cases.length; i < l; i++) { + var test_case = test_cases[i]; + var name = "Setting <" + test_case.href + ">." + attribute_to_be_set + + " = '" + test_case.new_value + "'"; + if ("comment" in test_case) { + name += " " + test_case.comment; + } + const key = test_case.href.split(":")[0]; + subsetTestByKey(key, test, function() { + var url = new URL(test_case.href); + url[attribute_to_be_set] = test_case.new_value; + for (var attribute in test_case.expected) { + assert_equals(url[attribute], test_case.expected[attribute]) + } + }, "URL: " + name) + } + } +} diff --git a/testing/web-platform/tests/url/url-statics-canparse.any.js b/testing/web-platform/tests/url/url-statics-canparse.any.js new file mode 100644 index 0000000000..74f3da31f0 --- /dev/null +++ b/testing/web-platform/tests/url/url-statics-canparse.any.js @@ -0,0 +1,42 @@ +// This intentionally does not use resources/urltestdata.json to preserve resources. +[ + { + "url": undefined, + "base": undefined, + "expected": false + }, + { + "url": "aaa:b", + "base": undefined, + "expected": true + }, + { + "url": undefined, + "base": "aaa:b", + "expected": false + }, + { + "url": "aaa:/b", + "base": undefined, + "expected": true + }, + { + "url": undefined, + "base": "aaa:/b", + "expected": true + }, + { + "url": "https://test:test", + "base": undefined, + "expected": false + }, + { + "url": "a", + "base": "https://b/", + "expected": true + } +].forEach(({ url, base, expected }) => { + test(() => { + assert_equals(URL.canParse(url, base), expected); + }, `URL.canParse(${url}, ${base})`); +}); diff --git a/testing/web-platform/tests/url/url-tojson.any.js b/testing/web-platform/tests/url/url-tojson.any.js new file mode 100644 index 0000000000..65165f96c5 --- /dev/null +++ b/testing/web-platform/tests/url/url-tojson.any.js @@ -0,0 +1,4 @@ +test(() => { + const a = new URL("https://example.com/") + assert_equals(JSON.stringify(a), "\"https://example.com/\"") +}) diff --git a/testing/web-platform/tests/url/urlencoded-parser.any.js b/testing/web-platform/tests/url/urlencoded-parser.any.js new file mode 100644 index 0000000000..847465cb92 --- /dev/null +++ b/testing/web-platform/tests/url/urlencoded-parser.any.js @@ -0,0 +1,68 @@ +[ + { "input": "test", "output": [["test", ""]] }, + { "input": "\uFEFFtest=\uFEFF", "output": [["\uFEFFtest", "\uFEFF"]] }, + { "input": "%EF%BB%BFtest=%EF%BB%BF", "output": [["\uFEFFtest", "\uFEFF"]] }, + { "input": "%EF%BF%BF=%EF%BF%BF", "output": [["\uFFFF", "\uFFFF"]] }, + { "input": "%FE%FF", "output": [["\uFFFD\uFFFD", ""]] }, + { "input": "%FF%FE", "output": [["\uFFFD\uFFFD", ""]] }, + { "input": "†&†=x", "output": [["†", ""], ["†", "x"]] }, + { "input": "%C2", "output": [["\uFFFD", ""]] }, + { "input": "%C2x", "output": [["\uFFFDx", ""]] }, + { "input": "_charset_=windows-1252&test=%C2x", "output": [["_charset_", "windows-1252"], ["test", "\uFFFDx"]] }, + { "input": '', "output": [] }, + { "input": 'a', "output": [['a', '']] }, + { "input": 'a=b', "output": [['a', 'b']] }, + { "input": 'a=', "output": [['a', '']] }, + { "input": '=b', "output": [['', 'b']] }, + { "input": '&', "output": [] }, + { "input": '&a', "output": [['a', '']] }, + { "input": 'a&', "output": [['a', '']] }, + { "input": 'a&a', "output": [['a', ''], ['a', '']] }, + { "input": 'a&b&c', "output": [['a', ''], ['b', ''], ['c', '']] }, + { "input": 'a=b&c=d', "output": [['a', 'b'], ['c', 'd']] }, + { "input": 'a=b&c=d&', "output": [['a', 'b'], ['c', 'd']] }, + { "input": '&&&a=b&&&&c=d&', "output": [['a', 'b'], ['c', 'd']] }, + { "input": 'a=a&a=b&a=c', "output": [['a', 'a'], ['a', 'b'], ['a', 'c']] }, + { "input": 'a==a', "output": [['a', '=a']] }, + { "input": 'a=a+b+c+d', "output": [['a', 'a b c d']] }, + { "input": '%=a', "output": [['%', 'a']] }, + { "input": '%a=a', "output": [['%a', 'a']] }, + { "input": '%a_=a', "output": [['%a_', 'a']] }, + { "input": '%61=a', "output": [['a', 'a']] }, + { "input": '%61+%4d%4D=', "output": [['a MM', '']] }, + { "input": "id=0&value=%", "output": [['id', '0'], ['value', '%']] }, + { "input": "b=%2sf%2a", "output": [['b', '%2sf*']]}, + { "input": "b=%2%2af%2a", "output": [['b', '%2*f*']]}, + { "input": "b=%%2a", "output": [['b', '%*']]} +].forEach((val) => { + test(() => { + let sp = new URLSearchParams(val.input), + i = 0 + for (let item of sp) { + assert_array_equals(item, val.output[i]) + i++ + } + }, "URLSearchParams constructed with: " + val.input) + + promise_test(() => { + let init = new Request("about:blank", { body: val.input, method: "LADIDA", headers: {"Content-Type": "application/x-www-form-urlencoded;charset=windows-1252"} }).formData() + return init.then((fd) => { + let i = 0 + for (let item of fd) { + assert_array_equals(item, val.output[i]) + i++ + } + }) + }, "request.formData() with input: " + val.input) + + promise_test(() => { + let init = new Response(val.input, { headers: {"Content-Type": "application/x-www-form-urlencoded;charset=shift_jis"} }).formData() + return init.then((fd) => { + let i = 0 + for (let item of fd) { + assert_array_equals(item, val.output[i]) + i++ + } + }) + }, "response.formData() with input: " + val.input) +}); diff --git a/testing/web-platform/tests/url/urlsearchparams-append.any.js b/testing/web-platform/tests/url/urlsearchparams-append.any.js new file mode 100644 index 0000000000..5a7376144d --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-append.any.js @@ -0,0 +1,39 @@ +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b'); + assert_equals(params + '', 'a=b'); + params.append('a', 'b'); + assert_equals(params + '', 'a=b&a=b'); + params.append('a', 'c'); + assert_equals(params + '', 'a=b&a=b&a=c'); +}, 'Append same name'); + +test(function() { + var params = new URLSearchParams(); + params.append('', ''); + assert_equals(params + '', '='); + params.append('', ''); + assert_equals(params + '', '=&='); +}, 'Append empty strings'); + +test(function() { + var params = new URLSearchParams(); + params.append(null, null); + assert_equals(params + '', 'null=null'); + params.append(null, null); + assert_equals(params + '', 'null=null&null=null'); +}, 'Append null'); + +test(function() { + var params = new URLSearchParams(); + params.append('first', 1); + params.append('second', 2); + params.append('third', ''); + params.append('first', 10); + assert_true(params.has('first'), 'Search params object has name "first"'); + assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"'); + assert_equals(params.get('second'), '2', 'Search params object has name "second" with value "2"'); + assert_equals(params.get('third'), '', 'Search params object has name "third" with value ""'); + params.append('first', 10); + assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"'); +}, 'Append multiple'); diff --git a/testing/web-platform/tests/url/urlsearchparams-constructor.any.js b/testing/web-platform/tests/url/urlsearchparams-constructor.any.js new file mode 100644 index 0000000000..d482911350 --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-constructor.any.js @@ -0,0 +1,224 @@ +test(function() { + var params = new URLSearchParams(); + assert_equals(params + '', ''); + params = new URLSearchParams(''); + assert_equals(params + '', ''); + params = new URLSearchParams('a=b'); + assert_equals(params + '', 'a=b'); + params = new URLSearchParams(params); + assert_equals(params + '', 'a=b'); +}, 'Basic URLSearchParams construction'); + +test(function() { + var params = new URLSearchParams() + assert_equals(params.toString(), "") +}, "URLSearchParams constructor, no arguments") + +test(function () { + var params = new URLSearchParams("?a=b") + assert_equals(params.toString(), "a=b") +}, 'URLSearchParams constructor, remove leading "?"') + +test(() => { + var params = new URLSearchParams(DOMException); + assert_equals(params.toString(), "INDEX_SIZE_ERR=1&DOMSTRING_SIZE_ERR=2&HIERARCHY_REQUEST_ERR=3&WRONG_DOCUMENT_ERR=4&INVALID_CHARACTER_ERR=5&NO_DATA_ALLOWED_ERR=6&NO_MODIFICATION_ALLOWED_ERR=7&NOT_FOUND_ERR=8&NOT_SUPPORTED_ERR=9&INUSE_ATTRIBUTE_ERR=10&INVALID_STATE_ERR=11&SYNTAX_ERR=12&INVALID_MODIFICATION_ERR=13&NAMESPACE_ERR=14&INVALID_ACCESS_ERR=15&VALIDATION_ERR=16&TYPE_MISMATCH_ERR=17&SECURITY_ERR=18&NETWORK_ERR=19&ABORT_ERR=20&URL_MISMATCH_ERR=21"A_EXCEEDED_ERR=22&TIMEOUT_ERR=23&INVALID_NODE_TYPE_ERR=24&DATA_CLONE_ERR=25") + assert_throws_js(TypeError, () => new URLSearchParams(DOMException.prototype), + "Constructing a URLSearchParams from DOMException.prototype should throw due to branding checks"); +}, "URLSearchParams constructor, DOMException as argument") + +test(() => { + var params = new URLSearchParams(''); + assert_true(params != null, 'constructor returned non-null value.'); + assert_equals(Object.getPrototypeOf(params), URLSearchParams.prototype, 'expected URLSearchParams.prototype as prototype.'); +}, "URLSearchParams constructor, empty string as argument") + +test(() => { + var params = new URLSearchParams({}); + assert_equals(params + '', ""); +}, 'URLSearchParams constructor, {} as argument'); + +test(function() { + var params = new URLSearchParams('a=b'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_false(params.has('b'), 'Search params object has not got name "b"'); + + params = new URLSearchParams('a=b&c'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_true(params.has('c'), 'Search params object has name "c"'); + + params = new URLSearchParams('&a&&& &&&&&a+b=& c&m%c3%b8%c3%b8'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_true(params.has('a b'), 'Search params object has name "a b"'); + assert_true(params.has(' '), 'Search params object has name " "'); + assert_false(params.has('c'), 'Search params object did not have the name "c"'); + assert_true(params.has(' c'), 'Search params object has name " c"'); + assert_true(params.has('møø'), 'Search params object has name "møø"'); + + params = new URLSearchParams('id=0&value=%'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('id'), 'Search params object has name "id"'); + assert_true(params.has('value'), 'Search params object has name "value"'); + assert_equals(params.get('id'), '0'); + assert_equals(params.get('value'), '%'); + + params = new URLSearchParams('b=%2sf%2a'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('b'), 'Search params object has name "b"'); + assert_equals(params.get('b'), '%2sf*'); + + params = new URLSearchParams('b=%2%2af%2a'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('b'), 'Search params object has name "b"'); + assert_equals(params.get('b'), '%2*f*'); + + params = new URLSearchParams('b=%%2a'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('b'), 'Search params object has name "b"'); + assert_equals(params.get('b'), '%*'); +}, 'URLSearchParams constructor, string.'); + +test(function() { + var seed = new URLSearchParams('a=b&c=d'); + var params = new URLSearchParams(seed); + assert_true(params != null, 'constructor returned non-null value.'); + assert_equals(params.get('a'), 'b'); + assert_equals(params.get('c'), 'd'); + assert_false(params.has('d')); + // The name-value pairs are copied when created; later updates + // should not be observable. + seed.append('e', 'f'); + assert_false(params.has('e')); + params.append('g', 'h'); + assert_false(seed.has('g')); +}, 'URLSearchParams constructor, object.'); + +test(function() { + var formData = new FormData() + formData.append('a', 'b') + formData.append('c', 'd') + var params = new URLSearchParams(formData); + assert_true(params != null, 'constructor returned non-null value.'); + assert_equals(params.get('a'), 'b'); + assert_equals(params.get('c'), 'd'); + assert_false(params.has('d')); + // The name-value pairs are copied when created; later updates + // should not be observable. + formData.append('e', 'f'); + assert_false(params.has('e')); + params.append('g', 'h'); + assert_false(formData.has('g')); +}, 'URLSearchParams constructor, FormData.'); + +test(function() { + var params = new URLSearchParams('a=b+c'); + assert_equals(params.get('a'), 'b c'); + params = new URLSearchParams('a+b=c'); + assert_equals(params.get('a b'), 'c'); +}, 'Parse +'); + +test(function() { + const testValue = '+15555555555'; + const params = new URLSearchParams(); + params.set('query', testValue); + var newParams = new URLSearchParams(params.toString()); + + assert_equals(params.toString(), 'query=%2B15555555555'); + assert_equals(params.get('query'), testValue); + assert_equals(newParams.get('query'), testValue); +}, 'Parse encoded +'); + +test(function() { + var params = new URLSearchParams('a=b c'); + assert_equals(params.get('a'), 'b c'); + params = new URLSearchParams('a b=c'); + assert_equals(params.get('a b'), 'c'); +}, 'Parse space'); + +test(function() { + var params = new URLSearchParams('a=b%20c'); + assert_equals(params.get('a'), 'b c'); + params = new URLSearchParams('a%20b=c'); + assert_equals(params.get('a b'), 'c'); +}, 'Parse %20'); + +test(function() { + var params = new URLSearchParams('a=b\0c'); + assert_equals(params.get('a'), 'b\0c'); + params = new URLSearchParams('a\0b=c'); + assert_equals(params.get('a\0b'), 'c'); +}, 'Parse \\0'); + +test(function() { + var params = new URLSearchParams('a=b%00c'); + assert_equals(params.get('a'), 'b\0c'); + params = new URLSearchParams('a%00b=c'); + assert_equals(params.get('a\0b'), 'c'); +}, 'Parse %00'); + +test(function() { + var params = new URLSearchParams('a=b\u2384'); + assert_equals(params.get('a'), 'b\u2384'); + params = new URLSearchParams('a\u2384b=c'); + assert_equals(params.get('a\u2384b'), 'c'); +}, 'Parse \u2384'); // Unicode Character 'COMPOSITION SYMBOL' (U+2384) + +test(function() { + var params = new URLSearchParams('a=b%e2%8e%84'); + assert_equals(params.get('a'), 'b\u2384'); + params = new URLSearchParams('a%e2%8e%84b=c'); + assert_equals(params.get('a\u2384b'), 'c'); +}, 'Parse %e2%8e%84'); // Unicode Character 'COMPOSITION SYMBOL' (U+2384) + +test(function() { + var params = new URLSearchParams('a=b\uD83D\uDCA9c'); + assert_equals(params.get('a'), 'b\uD83D\uDCA9c'); + params = new URLSearchParams('a\uD83D\uDCA9b=c'); + assert_equals(params.get('a\uD83D\uDCA9b'), 'c'); +}, 'Parse \uD83D\uDCA9'); // Unicode Character 'PILE OF POO' (U+1F4A9) + +test(function() { + var params = new URLSearchParams('a=b%f0%9f%92%a9c'); + assert_equals(params.get('a'), 'b\uD83D\uDCA9c'); + params = new URLSearchParams('a%f0%9f%92%a9b=c'); + assert_equals(params.get('a\uD83D\uDCA9b'), 'c'); +}, 'Parse %f0%9f%92%a9'); // Unicode Character 'PILE OF POO' (U+1F4A9) + +test(function() { + var params = new URLSearchParams([]); + assert_true(params != null, 'constructor returned non-null value.'); + params = new URLSearchParams([['a', 'b'], ['c', 'd']]); + assert_equals(params.get("a"), "b"); + assert_equals(params.get("c"), "d"); + assert_throws_js(TypeError, function() { new URLSearchParams([[1]]); }); + assert_throws_js(TypeError, function() { new URLSearchParams([[1,2,3]]); }); +}, "Constructor with sequence of sequences of strings"); + +[ + { "input": {"+": "%C2"}, "output": [["+", "%C2"]], "name": "object with +" }, + { "input": {c: "x", a: "?"}, "output": [["c", "x"], ["a", "?"]], "name": "object with two keys" }, + { "input": [["c", "x"], ["a", "?"]], "output": [["c", "x"], ["a", "?"]], "name": "array with two keys" }, + { "input": {"\uD835x": "1", "xx": "2", "\uD83Dx": "3"}, "output": [["\uFFFDx", "3"], ["xx", "2"]], "name": "2 unpaired surrogates (no trailing)" }, + { "input": {"x\uDC53": "1", "x\uDC5C": "2", "x\uDC65": "3"}, "output": [["x\uFFFD", "3"]], "name": "3 unpaired surrogates (no leading)" }, + { "input": {"a\0b": "42", "c\uD83D": "23", "d\u1234": "foo"}, "output": [["a\0b", "42"], ["c\uFFFD", "23"], ["d\u1234", "foo"]], "name": "object with NULL, non-ASCII, and surrogate keys" } +].forEach((val) => { + test(() => { + let params = new URLSearchParams(val.input), + i = 0 + for (let param of params) { + assert_array_equals(param, val.output[i]) + i++ + } + }, "Construct with " + val.name) +}) + +test(() => { + var params = new URLSearchParams() + params[Symbol.iterator] = function *() { + yield ["a", "b"] + } + let params2 = new URLSearchParams(params) + assert_equals(params2.get("a"), "b") +}, "Custom [Symbol.iterator]") diff --git a/testing/web-platform/tests/url/urlsearchparams-delete.any.js b/testing/web-platform/tests/url/urlsearchparams-delete.any.js new file mode 100644 index 0000000000..c597142c51 --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-delete.any.js @@ -0,0 +1,83 @@ +test(function() { + var params = new URLSearchParams('a=b&c=d'); + params.delete('a'); + assert_equals(params + '', 'c=d'); + params = new URLSearchParams('a=a&b=b&a=a&c=c'); + params.delete('a'); + assert_equals(params + '', 'b=b&c=c'); + params = new URLSearchParams('a=a&=&b=b&c=c'); + params.delete(''); + assert_equals(params + '', 'a=a&b=b&c=c'); + params = new URLSearchParams('a=a&null=null&b=b'); + params.delete(null); + assert_equals(params + '', 'a=a&b=b'); + params = new URLSearchParams('a=a&undefined=undefined&b=b'); + params.delete(undefined); + assert_equals(params + '', 'a=a&b=b'); +}, 'Delete basics'); + +test(function() { + var params = new URLSearchParams(); + params.append('first', 1); + assert_true(params.has('first'), 'Search params object has name "first"'); + assert_equals(params.get('first'), '1', 'Search params object has name "first" with value "1"'); + params.delete('first'); + assert_false(params.has('first'), 'Search params object has no "first" name'); + params.append('first', 1); + params.append('first', 10); + params.delete('first'); + assert_false(params.has('first'), 'Search params object has no "first" name'); +}, 'Deleting appended multiple'); + +test(function() { + var url = new URL('http://example.com/?param1¶m2'); + url.searchParams.delete('param1'); + url.searchParams.delete('param2'); + assert_equals(url.href, 'http://example.com/', 'url.href does not have ?'); + assert_equals(url.search, '', 'url.search does not have ?'); +}, 'Deleting all params removes ? from URL'); + +test(function() { + var url = new URL('http://example.com/?'); + url.searchParams.delete('param1'); + assert_equals(url.href, 'http://example.com/', 'url.href does not have ?'); + assert_equals(url.search, '', 'url.search does not have ?'); +}, 'Removing non-existent param removes ? from URL'); + +test(() => { + const url = new URL('data:space ?test'); + assert_true(url.searchParams.has('test')); + url.searchParams.delete('test'); + assert_false(url.searchParams.has('test')); + assert_equals(url.search, ''); + assert_equals(url.pathname, 'space'); + assert_equals(url.href, 'data:space'); +}, 'Changing the query of a URL with an opaque path can impact the path'); + +test(() => { + const url = new URL('data:space ?test#test'); + url.searchParams.delete('test'); + assert_equals(url.search, ''); + assert_equals(url.pathname, 'space '); + assert_equals(url.href, 'data:space #test'); +}, 'Changing the query of a URL with an opaque path can impact the path if the URL has no fragment'); + +test(() => { + const params = new URLSearchParams(); + params.append('a', 'b'); + params.append('a', 'c'); + params.append('a', 'd'); + params.delete('a', 'c'); + assert_equals(params.toString(), 'a=b&a=d'); +}, "Two-argument delete()"); + +test(() => { + const params = new URLSearchParams(); + params.append('a', 'b'); + params.append('a', 'c'); + params.append('b', 'c'); + params.append('b', 'd'); + params.delete('b', 'c'); + params.delete('a', undefined); + assert_equals(params.toString(), 'b=d'); +}, "Two-argument delete() respects undefined as second arg"); diff --git a/testing/web-platform/tests/url/urlsearchparams-foreach.any.js b/testing/web-platform/tests/url/urlsearchparams-foreach.any.js new file mode 100644 index 0000000000..ff19643ac2 --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-foreach.any.js @@ -0,0 +1,76 @@ +test(function() { + var params = new URLSearchParams('a=1&b=2&c=3'); + var keys = []; + var values = []; + params.forEach(function(value, key) { + keys.push(key); + values.push(value); + }); + assert_array_equals(keys, ['a', 'b', 'c']); + assert_array_equals(values, ['1', '2', '3']); +}, "ForEach Check"); + +test(function() { + let a = new URL("http://a.b/c?a=1&b=2&c=3&d=4"); + let b = a.searchParams; + var c = []; + for (const i of b) { + a.search = "x=1&y=2&z=3"; + c.push(i); + } + assert_array_equals(c[0], ["a","1"]); + assert_array_equals(c[1], ["y","2"]); + assert_array_equals(c[2], ["z","3"]); +}, "For-of Check"); + +test(function() { + let a = new URL("http://a.b/c"); + let b = a.searchParams; + for (const i of b) { + assert_unreached(i); + } +}, "empty"); + +test(function() { + const url = new URL("http://localhost/query?param0=0¶m1=1¶m2=2"); + const searchParams = url.searchParams; + const seen = []; + for (const param of searchParams) { + if (param[0] === 'param0') { + searchParams.delete('param1'); + } + seen.push(param); + } + + assert_array_equals(seen[0], ["param0", "0"]); + assert_array_equals(seen[1], ["param2", "2"]); +}, "delete next param during iteration"); + +test(function() { + const url = new URL("http://localhost/query?param0=0¶m1=1¶m2=2"); + const searchParams = url.searchParams; + const seen = []; + for (const param of searchParams) { + if (param[0] === 'param0') { + searchParams.delete('param0'); + // 'param1=1' is now in the first slot, so the next iteration will see 'param2=2'. + } else { + seen.push(param); + } + } + + assert_array_equals(seen[0], ["param2", "2"]); +}, "delete current param during iteration"); + +test(function() { + const url = new URL("http://localhost/query?param0=0¶m1=1¶m2=2"); + const searchParams = url.searchParams; + const seen = []; + for (const param of searchParams) { + seen.push(param[0]); + searchParams.delete(param[0]); + } + + assert_array_equals(seen, ["param0", "param2"], "param1 should not have been seen by the loop"); + assert_equals(String(searchParams), "param1=1", "param1 should remain"); +}, "delete every param seen during iteration"); diff --git a/testing/web-platform/tests/url/urlsearchparams-get.any.js b/testing/web-platform/tests/url/urlsearchparams-get.any.js new file mode 100644 index 0000000000..a2610fc933 --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-get.any.js @@ -0,0 +1,21 @@ +test(function() { + var params = new URLSearchParams('a=b&c=d'); + assert_equals(params.get('a'), 'b'); + assert_equals(params.get('c'), 'd'); + assert_equals(params.get('e'), null); + params = new URLSearchParams('a=b&c=d&a=e'); + assert_equals(params.get('a'), 'b'); + params = new URLSearchParams('=b&c=d'); + assert_equals(params.get(''), 'b'); + params = new URLSearchParams('a=&c=d&a=e'); + assert_equals(params.get('a'), ''); +}, 'Get basics'); + +test(function() { + var params = new URLSearchParams('first=second&third&&'); + assert_true(params != null, 'constructor returned non-null value.'); + assert_true(params.has('first'), 'Search params object has name "first"'); + assert_equals(params.get('first'), 'second', 'Search params object has name "first" with value "second"'); + assert_equals(params.get('third'), '', 'Search params object has name "third" with the empty value.'); + assert_equals(params.get('fourth'), null, 'Search params object has no "fourth" name and value.'); +}, 'More get() basics'); diff --git a/testing/web-platform/tests/url/urlsearchparams-getall.any.js b/testing/web-platform/tests/url/urlsearchparams-getall.any.js new file mode 100644 index 0000000000..5d1a35352a --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-getall.any.js @@ -0,0 +1,25 @@ +test(function() { + var params = new URLSearchParams('a=b&c=d'); + assert_array_equals(params.getAll('a'), ['b']); + assert_array_equals(params.getAll('c'), ['d']); + assert_array_equals(params.getAll('e'), []); + params = new URLSearchParams('a=b&c=d&a=e'); + assert_array_equals(params.getAll('a'), ['b', 'e']); + params = new URLSearchParams('=b&c=d'); + assert_array_equals(params.getAll(''), ['b']); + params = new URLSearchParams('a=&c=d&a=e'); + assert_array_equals(params.getAll('a'), ['', 'e']); +}, 'getAll() basics'); + +test(function() { + var params = new URLSearchParams('a=1&a=2&a=3&a'); + assert_true(params.has('a'), 'Search params object has name "a"'); + var matches = params.getAll('a'); + assert_true(matches && matches.length == 4, 'Search params object has values for name "a"'); + assert_array_equals(matches, ['1', '2', '3', ''], 'Search params object has expected name "a" values'); + params.set('a', 'one'); + assert_equals(params.get('a'), 'one', 'Search params object has name "a" with value "one"'); + var matches = params.getAll('a'); + assert_true(matches && matches.length == 1, 'Search params object has values for name "a"'); + assert_array_equals(matches, ['one'], 'Search params object has expected name "a" values'); +}, 'getAll() multiples'); diff --git a/testing/web-platform/tests/url/urlsearchparams-has.any.js b/testing/web-platform/tests/url/urlsearchparams-has.any.js new file mode 100644 index 0000000000..2133a5da2f --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-has.any.js @@ -0,0 +1,45 @@ +test(function() { + var params = new URLSearchParams('a=b&c=d'); + assert_true(params.has('a')); + assert_true(params.has('c')); + assert_false(params.has('e')); + params = new URLSearchParams('a=b&c=d&a=e'); + assert_true(params.has('a')); + params = new URLSearchParams('=b&c=d'); + assert_true(params.has('')); + params = new URLSearchParams('null=a'); + assert_true(params.has(null)); +}, 'Has basics'); + +test(function() { + var params = new URLSearchParams('a=b&c=d&&'); + params.append('first', 1); + params.append('first', 2); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_true(params.has('c'), 'Search params object has name "c"'); + assert_true(params.has('first'), 'Search params object has name "first"'); + assert_false(params.has('d'), 'Search params object has no name "d"'); + params.delete('first'); + assert_false(params.has('first'), 'Search params object has no name "first"'); +}, 'has() following delete()'); + +test(() => { + const params = new URLSearchParams("a=b&a=d&c&e&"); + assert_true(params.has('a', 'b')); + assert_false(params.has('a', 'c')); + assert_true(params.has('a', 'd')); + assert_true(params.has('e', '')); + params.append('first', null); + assert_false(params.has('first', '')); + assert_true(params.has('first', 'null')); + params.delete('a', 'b'); + assert_true(params.has('a', 'd')); +}, "Two-argument has()"); + +test(() => { + const params = new URLSearchParams("a=b&a=d&c&e&"); + assert_true(params.has('a', 'b')); + assert_false(params.has('a', 'c')); + assert_true(params.has('a', 'd')); + assert_true(params.has('a', undefined)); +}, "Two-argument has() respects undefined as second arg");
\ No newline at end of file diff --git a/testing/web-platform/tests/url/urlsearchparams-set.any.js b/testing/web-platform/tests/url/urlsearchparams-set.any.js new file mode 100644 index 0000000000..eb24cac87b --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-set.any.js @@ -0,0 +1,22 @@ +test(function() { + var params = new URLSearchParams('a=b&c=d'); + params.set('a', 'B'); + assert_equals(params + '', 'a=B&c=d'); + params = new URLSearchParams('a=b&c=d&a=e'); + params.set('a', 'B'); + assert_equals(params + '', 'a=B&c=d') + params.set('e', 'f'); + assert_equals(params + '', 'a=B&c=d&e=f') +}, 'Set basics'); + +test(function() { + var params = new URLSearchParams('a=1&a=2&a=3'); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_equals(params.get('a'), '1', 'Search params object has name "a" with value "1"'); + params.set('first', 4); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_equals(params.get('a'), '1', 'Search params object has name "a" with value "1"'); + params.set('a', 4); + assert_true(params.has('a'), 'Search params object has name "a"'); + assert_equals(params.get('a'), '4', 'Search params object has name "a" with value "4"'); +}, 'URLSearchParams.set'); diff --git a/testing/web-platform/tests/url/urlsearchparams-size.any.js b/testing/web-platform/tests/url/urlsearchparams-size.any.js new file mode 100644 index 0000000000..7b3abc7c0b --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-size.any.js @@ -0,0 +1,34 @@ +test(() => { + const params = new URLSearchParams("a=1&b=2&a=3"); + assert_equals(params.size, 3); + + params.delete("a"); + assert_equals(params.size, 1); +}, "URLSearchParams's size and deletion"); + +test(() => { + const params = new URLSearchParams("a=1&b=2&a=3"); + assert_equals(params.size, 3); + + params.append("b", "4"); + assert_equals(params.size, 4); +}, "URLSearchParams's size and addition"); + +test(() => { + const url = new URL("http://localhost/query?a=1&b=2&a=3"); + assert_equals(url.searchParams.size, 3); + + url.searchParams.delete("a"); + assert_equals(url.searchParams.size, 1); + + url.searchParams.append("b", 4); + assert_equals(url.searchParams.size, 2); +}, "URLSearchParams's size when obtained from a URL"); + +test(() => { + const url = new URL("http://localhost/query?a=1&b=2&a=3"); + assert_equals(url.searchParams.size, 3); + + url.search = "?"; + assert_equals(url.searchParams.size, 0); +}, "URLSearchParams's size when obtained from a URL and using .search"); diff --git a/testing/web-platform/tests/url/urlsearchparams-sort.any.js b/testing/web-platform/tests/url/urlsearchparams-sort.any.js new file mode 100644 index 0000000000..4fd8cef692 --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-sort.any.js @@ -0,0 +1,62 @@ +[ + { + "input": "z=b&a=b&z=a&a=a", + "output": [["a", "b"], ["a", "a"], ["z", "b"], ["z", "a"]] + }, + { + "input": "\uFFFD=x&\uFFFC&\uFFFD=a", + "output": [["\uFFFC", ""], ["\uFFFD", "x"], ["\uFFFD", "a"]] + }, + { + "input": "ffi&🌈", // 🌈 > code point, but < code unit because two code units + "output": [["🌈", ""], ["ffi", ""]] + }, + { + "input": "é&e\uFFFD&e\u0301", + "output": [["e\u0301", ""], ["e\uFFFD", ""], ["é", ""]] + }, + { + "input": "z=z&a=a&z=y&a=b&z=x&a=c&z=w&a=d&z=v&a=e&z=u&a=f&z=t&a=g", + "output": [["a", "a"], ["a", "b"], ["a", "c"], ["a", "d"], ["a", "e"], ["a", "f"], ["a", "g"], ["z", "z"], ["z", "y"], ["z", "x"], ["z", "w"], ["z", "v"], ["z", "u"], ["z", "t"]] + }, + { + "input": "bbb&bb&aaa&aa=x&aa=y", + "output": [["aa", "x"], ["aa", "y"], ["aaa", ""], ["bb", ""], ["bbb", ""]] + }, + { + "input": "z=z&=f&=t&=x", + "output": [["", "f"], ["", "t"], ["", "x"], ["z", "z"]] + }, + { + "input": "a🌈&a💩", + "output": [["a🌈", ""], ["a💩", ""]] + } +].forEach((val) => { + test(() => { + let params = new URLSearchParams(val.input), + i = 0 + params.sort() + for(let param of params) { + assert_array_equals(param, val.output[i]) + i++ + } + }, "Parse and sort: " + val.input) + + test(() => { + let url = new URL("?" + val.input, "https://example/") + url.searchParams.sort() + let params = new URLSearchParams(url.search), + i = 0 + for(let param of params) { + assert_array_equals(param, val.output[i]) + i++ + } + }, "URL parse and sort: " + val.input) +}) + +test(function() { + const url = new URL("http://example.com/?") + url.searchParams.sort() + assert_equals(url.href, "http://example.com/") + assert_equals(url.search, "") +}, "Sorting non-existent params removes ? from URL") diff --git a/testing/web-platform/tests/url/urlsearchparams-stringifier.any.js b/testing/web-platform/tests/url/urlsearchparams-stringifier.any.js new file mode 100644 index 0000000000..6187db64b1 --- /dev/null +++ b/testing/web-platform/tests/url/urlsearchparams-stringifier.any.js @@ -0,0 +1,145 @@ +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b c'); + assert_equals(params + '', 'a=b+c'); + params.delete('a'); + params.append('a b', 'c'); + assert_equals(params + '', 'a+b=c'); +}, 'Serialize space'); + +test(function() { + var params = new URLSearchParams(); + params.append('a', ''); + assert_equals(params + '', 'a='); + params.append('a', ''); + assert_equals(params + '', 'a=&a='); + params.append('', 'b'); + assert_equals(params + '', 'a=&a=&=b'); + params.append('', ''); + assert_equals(params + '', 'a=&a=&=b&='); + params.append('', ''); + assert_equals(params + '', 'a=&a=&=b&=&='); +}, 'Serialize empty value'); + +test(function() { + var params = new URLSearchParams(); + params.append('', 'b'); + assert_equals(params + '', '=b'); + params.append('', 'b'); + assert_equals(params + '', '=b&=b'); +}, 'Serialize empty name'); + +test(function() { + var params = new URLSearchParams(); + params.append('', ''); + assert_equals(params + '', '='); + params.append('', ''); + assert_equals(params + '', '=&='); +}, 'Serialize empty name and value'); + +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b+c'); + assert_equals(params + '', 'a=b%2Bc'); + params.delete('a'); + params.append('a+b', 'c'); + assert_equals(params + '', 'a%2Bb=c'); +}, 'Serialize +'); + +test(function() { + var params = new URLSearchParams(); + params.append('=', 'a'); + assert_equals(params + '', '%3D=a'); + params.append('b', '='); + assert_equals(params + '', '%3D=a&b=%3D'); +}, 'Serialize ='); + +test(function() { + var params = new URLSearchParams(); + params.append('&', 'a'); + assert_equals(params + '', '%26=a'); + params.append('b', '&'); + assert_equals(params + '', '%26=a&b=%26'); +}, 'Serialize &'); + +test(function() { + var params = new URLSearchParams(); + params.append('a', '*-._'); + assert_equals(params + '', 'a=*-._'); + params.delete('a'); + params.append('*-._', 'c'); + assert_equals(params + '', '*-._=c'); +}, 'Serialize *-._'); + +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b%c'); + assert_equals(params + '', 'a=b%25c'); + params.delete('a'); + params.append('a%b', 'c'); + assert_equals(params + '', 'a%25b=c'); + + params = new URLSearchParams('id=0&value=%') + assert_equals(params + '', 'id=0&value=%25') +}, 'Serialize %'); + +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b\0c'); + assert_equals(params + '', 'a=b%00c'); + params.delete('a'); + params.append('a\0b', 'c'); + assert_equals(params + '', 'a%00b=c'); +}, 'Serialize \\0'); + +test(function() { + var params = new URLSearchParams(); + params.append('a', 'b\uD83D\uDCA9c'); + assert_equals(params + '', 'a=b%F0%9F%92%A9c'); + params.delete('a'); + params.append('a\uD83D\uDCA9b', 'c'); + assert_equals(params + '', 'a%F0%9F%92%A9b=c'); +}, 'Serialize \uD83D\uDCA9'); // Unicode Character 'PILE OF POO' (U+1F4A9) + +test(function() { + var params; + params = new URLSearchParams('a=b&c=d&&e&&'); + assert_equals(params.toString(), 'a=b&c=d&e='); + params = new URLSearchParams('a = b &a=b&c=d%20'); + assert_equals(params.toString(), 'a+=+b+&a=b&c=d+'); + // The lone '=' _does_ survive the roundtrip. + params = new URLSearchParams('a=&a=b'); + assert_equals(params.toString(), 'a=&a=b'); + + params = new URLSearchParams('b=%2sf%2a'); + assert_equals(params.toString(), 'b=%252sf*'); + + params = new URLSearchParams('b=%2%2af%2a'); + assert_equals(params.toString(), 'b=%252*f*'); + + params = new URLSearchParams('b=%%2a'); + assert_equals(params.toString(), 'b=%25*'); +}, 'URLSearchParams.toString'); + +test(() => { + const url = new URL('http://www.example.com/?a=b,c'); + const params = url.searchParams; + + assert_equals(url.toString(), 'http://www.example.com/?a=b,c'); + assert_equals(params.toString(), 'a=b%2Cc'); + + params.append('x', 'y'); + + assert_equals(url.toString(), 'http://www.example.com/?a=b%2Cc&x=y'); + assert_equals(params.toString(), 'a=b%2Cc&x=y'); +}, 'URLSearchParams connected to URL'); + +test(() => { + const url = new URL('http://www.example.com/'); + const params = url.searchParams; + + params.append('a\nb', 'c\rd'); + params.append('e\n\rf', 'g\r\nh'); + + assert_equals(params.toString(), "a%0Ab=c%0Dd&e%0A%0Df=g%0D%0Ah"); +}, 'URLSearchParams must not do newline normalization'); |