Restore grandfathered tests removed in #2054

With the move to UTS 35 for language tag processing, the expected
canonicalisation results for "cel-gaulish" should now be consistent across
implementations.
This commit is contained in:
André Bargull 2020-03-30 04:55:24 -07:00 committed by Rick Waldron
parent de02cf4dd5
commit 5d8e6c8e85
3 changed files with 23 additions and 0 deletions

View File

@ -22,6 +22,18 @@ features: [Intl.Locale]
---*/
const testData = [
// Regular grandfathered without modern replacement.
{
tag: "cel-gaulish",
options: {
language: "fr",
script: "Cyrl",
region: "FR",
numberingSystem: "latn",
},
canonical: "fr-Cyrl-FR-u-nu-latn-x-cel-gaulish",
},
// Regular grandfathered with modern replacement.
{
tag: "art-lojban",

View File

@ -25,6 +25,13 @@ info: |
features: [Intl.Locale]
---*/
// Regular grandfathered language tag.
var loc = new Intl.Locale("cel-gaulish");
assert.sameValue(loc.baseName, "xtg");
assert.sameValue(loc.language, "xtg");
assert.sameValue(loc.script, undefined);
assert.sameValue(loc.region, undefined);
// Regular grandfathered language tag.
assert.throws(RangeError, () => new Intl.Locale("zh-min"));

View File

@ -66,6 +66,10 @@ const regularGrandfathered = [
canonical: "jbo",
maximized: "jbo-Latn-001",
},
{
tag: "cel-gaulish",
canonical: "xtg-x-cel-gaulish",
},
{
tag: "zh-guoyu",
canonical: "zh",