Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,104 @@
[
"This is generated with the help from ../tools/IdnaTestV2-compare.py.",
"These tests are from an older IdnaTestV2 and thus the comment line may no longer be accurate.",
{
"comment": "P1; V6; V3 (ignored)",
"input": "-\udb40\ude56\ua867\uff0e\udb40\ude82\ud8dc\udd83\ud83c\udd09",
"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": "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": "C2; P1; V6",
"input": "\u0756\u3002\u3164\u200d\u03a3",
"output": null
},
{
"comment": "C2; P1; V6",
"input": "\u0756\u3002\u3164\u200d\u03c3",
"output": null
},
{
"comment": "P1; V6",
"input": "\ud83c\udd07\u4f10\ufe12.\ud831\ude5a\ua8c4",
"output": null
},
{
"comment": "P1; V5; V6",
"input": "\ud802\ude3f.\ud83c\udd06\u2014",
"output": null
},
{
"comment": "C2; P1; V5; V6",
"input": "\u1c32\ud83c\udd08\u2f9b\u05a6\uff0e\u200d\uda7e\udd64\u07fd",
"output": null
},
{
"comment": "C2; P1; V5; V6",
"input": "\ud83e\udc9f\ud83c\udd08\u200d\ua84e\uff61\u0f84",
"output": null
},
{
"comment": "P1; V6",
"input": "\udaa5\udeaa\uff61\ud83c\udd02",
"output": null
},
{
"comment": "C2; P1; V6",
"input": "\u186f\u2689\u59f6\ud83c\udd09\uff0e\u06f7\u200d\ud83c\udfaa\u200d",
"output": null
},
{
"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": "C1; P1; V5; V6; V3 (ignored)",
"input": "-\u1897\u200c\ud83c\udd04.\ud805\udf22",
"output": null
}
]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,39 @@
promise_test(() => Promise.all([
fetch("resources/urltestdata.json").then(res => res.json()),
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
]).then((tests) => tests.flat()).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 + ">")
}
}

View File

@ -0,0 +1,66 @@
promise_test(() => Promise.all([
fetch("resources/urltestdata.json").then(res => res.json()),
fetch("resources/urltestdata-javascript-only.json").then(res => res.json()),
]).then((tests) => tests.flat()).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 + ">")
}
}

View File

@ -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|"
}
}
]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,378 @@
[
"This contains assorted IDNA tests that IdnaTestV2 might not cover.",
"Feel free to deduplicate with a clear commit message.",
"",
"If the test only applies to the URL Standard's 'domain to ASCII', ",
"and not to TR46's ToASCII, then tag it with `urlStandardOnly`",
{
"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"
},
{
"comment": "NFC normalization (forbidden < and > characters are normalized to valid ones)",
"input": "=\u0338",
"output": "xn--1ch"
},
{
"input": "<\u0338",
"output": "xn--gdh"
},
{
"input": ">\u0338",
"output": "xn--hdh"
},
{
"comment": "Same with inserted IDNA ignored code point",
"input": "=\u00AD\u0338",
"output": "xn--1ch"
},
{
"input": "<\u00AD\u0338",
"output": "xn--gdh"
},
{
"input": ">\u00AD\u0338",
"output": "xn--hdh"
},
"Tests below are from WebKit (fast/url/idna2003.html & fast/url/idna2008.html; contributed by Chris Weber back in 2011).",
{
"input": "fa\u00DF.de",
"output": "xn--fa-hia.de"
},
{
"input": "\u03B2\u03CC\u03BB\u03BF\u03C2.com",
"output": "xn--nxasmm1c.com"
},
{
"input": "\u0DC1\u0DCA\u200D\u0DBB\u0DD3.com",
"output": "xn--10cl1a0b660p.com"
},
{
"input": "\u0646\u0627\u0645\u0647\u200C\u0627\u06CC.com",
"output": "xn--mgba3gch31f060k.com"
},
{
"input": "www.loo\u0138out.net",
"output": "www.xn--looout-5bb.net"
},
{
"input": "\u15EF\u15EF\u15EF.lookout.net",
"output": "xn--1qeaa.lookout.net"
},
{
"input": "www.lookout.\u0441\u043E\u043C",
"output": "www.lookout.xn--l1adi"
},
{
"input": "www\u2025lookout.net",
"output": null
},
{
"input": "www.lookout\u2027net",
"output": "www.xn--lookoutnet-406e"
},
{
"input": "www.lookout.net\u2A7480",
"output": null,
"urlStandardOnly": true
},
{
"input": "www\u00A0.lookout.net",
"output": null,
"urlStandardOnly": true
},
{
"input": "\u1680lookout.net",
"output": null
},
{
"input": "\u001flookout.net",
"output": null,
"urlStandardOnly": true
},
{
"input": "look\u06DDout.net",
"output": null
},
{
"input": "look\u180Eout.net",
"output": "lookout.net"
},
{
"input": "look\u2060out.net",
"output": "lookout.net"
},
{
"input": "look\uFEFFout.net",
"output": "lookout.net"
},
{
"input": "look\uD83F\uDFFEout.net",
"output": null
},
{
"input": "look\uFFFAout.net",
"output": null
},
{
"input": "look\u2FF0out.net",
"output": null
},
{
"input": "look\u0341out.net",
"output": "xn--looout-kp7b.net"
},
{
"input": "look\u202Eout.net",
"output": null
},
{
"input": "look\u206Bout.net",
"output": "lookout.net"
},
{
"input": "look\uDB40\uDC01out.net",
"output": null
},
{
"input": "look\uDB40\uDC20out.net",
"output": null
},
{
"input": "look\u05BEout.net",
"output": null
},
{
"input": "B\u00FCcher.de",
"output": "xn--bcher-kva.de"
},
{
"input": "\u2665.net",
"output": "xn--g6h.net"
},
{
"input": "\u0378.net",
"output": null
},
{
"input": "\u04C0.com",
"output": "xn--s5a.com"
},
{
"input": "\uD87E\uDC68.com",
"output": "xn--snl.com"
},
{
"input": "\u2183.com",
"output": "xn--r5g.com"
},
{
"input": "look\u034Fout.net",
"output": "lookout.net"
},
{
"input": "gOoGle.com",
"output": "google.com"
},
{
"input": "\u09dc.com",
"output": "xn--15b8c.com"
},
{
"input": "\u1E9E.com",
"output": "xn--zca.com"
},
{
"input": "\u1E9E.foo.com",
"output": "xn--zca.foo.com"
},
{
"input": "-foo.bar.com",
"output": "-foo.bar.com"
},
{
"input": "foo-.bar.com",
"output": "foo-.bar.com"
},
{
"input": "ab--cd.com",
"output": "ab--cd.com"
},
{
"input": "xn--0.com",
"output": null
},
{
"input": "foo\u0300.bar.com",
"output": "xn--fo-3ja.bar.com"
}
]

View File

@ -0,0 +1,18 @@
[
"See ../README.md for a description of the format.",
{
"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": ""
}
]

File diff suppressed because it is too large Load Diff