fix(web): 修復排版邊界與增量生命週期
This commit is contained in:
@@ -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: {} };
|
||||
|
||||
Reference in New Issue
Block a user