Update Intl.Locale tests for UTS 35

constructor-non-iana-canon.js
- Variant subtag canonicalisation is currently no longer present.

constructor-options-region-valid.js
- Digit region codes are now canonicalised.

constructor-tag.js
- Variant subtags are now sorted alphabetically.

likely-subtags-grandfathered.js
- "cmn" is now canonicalised to "zh".
This commit is contained in:
André Bargull 2019-07-22 02:12:17 -07:00
parent 1edeb484b8
commit e2ad1357c7
4 changed files with 13 additions and 7 deletions

View File

@ -79,13 +79,18 @@ var testData = [
maximized: "cs-Latn-CZ",
},
{
// ECMA-402 currently requires that variant subtags are not canonicalized.
// https://github.com/tc39/ecma402/issues/330
tag: "hy-arevela",
canonical: "hy",
maximized: "hy-Armn-AM",
canonical: "hy-arevela",
maximized: "hy-Armn-AM-arevela",
},
{
// ECMA-402 currently requires that variant subtags are not canonicalized.
// https://github.com/tc39/ecma402/issues/330
tag: "hy-arevmda",
canonical: "hyw",
canonical: "hy-arevmda",
maximized: "hy-Armn-AM-arevmda",
},
];

View File

@ -31,8 +31,8 @@ features: [Intl.Locale]
const validRegionOptions = [
[undefined, undefined],
['FR', 'en-FR'],
['554', 'en-554'],
[554, 'en-554'],
['554', 'en-NZ'],
[554, 'en-NZ'],
];
for (const [region, expected] of validRegionOptions) {
let options = { region };

View File

@ -25,7 +25,7 @@ const validLanguageTags = {
"DE-1996": "de-1996", // unicode_language_subtag sep unicode_variant_subtag
// unicode_language_subtag (sep unicode_variant_subtag)*
"sl-ROZAJ-BISKE-1994": "sl-rozaj-biske-1994",
"sl-ROZAJ-BISKE-1994": "sl-1994-biske-rozaj",
"zh-latn-pinyin-pinyin2": "zh-Latn-pinyin-pinyin2",
};

View File

@ -68,7 +68,8 @@ const regularGrandfathered = [
},
{
tag: "zh-guoyu",
canonical: "cmn",
canonical: "zh",
maximized: "zh-Hans-CN",
},
{
tag: "zh-hakka",