fix(web): 修復排版邊界與增量生命週期

This commit is contained in:
2026-10-02 19:08:02 +08:00
parent 1c2fb0ed59
commit b1a16c4969
39 changed files with 4763 additions and 673 deletions
+14
View File
@@ -298,6 +298,20 @@ test("shared rules: canonical character classes equal the Web source constants",
assert.equal(canonical.overrideSemantics.reclassificationAllowed, false);
});
test("shared rules: explicit script identifiers match whole subtags", () =>
{
for (const [ lang, expected ] of [
[ "zh-CN-x-shant", "zh-Hans" ],
[ "zh-TW-x-hansford", "zh-Hant" ],
[ "ZH-CN-X-EHANT", "zh-Hans" ],
[ "zh-Hant-CN", "zh-Hant" ],
[ "zh-Hans-TW", "zh-Hans" ],
])
{
assert.equal(adapter.classify(lang), expected, lang);
}
});
test("shared rules: locale defaults and all language vectors match the Web adapter", () =>
{
const config = { default: "zh-Hant", policy: {} };