From de02cf4dd588aefccb6207d61de09fae4aeaada1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Mon, 30 Mar 2020 04:55:22 -0700 Subject: [PATCH] Re-enable variant subtag canonicalisation in tests UTS 35 canonicalisation requires to (again) canonicalise variant subtags. --- .../Intl/getCanonicalLocales/non-iana-canon.js | 8 ++------ .../Intl/getCanonicalLocales/preferred-variant.js | 8 +++----- test/intl402/Locale/constructor-non-iana-canon.js | 11 +++-------- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/test/intl402/Intl/getCanonicalLocales/non-iana-canon.js b/test/intl402/Intl/getCanonicalLocales/non-iana-canon.js index 57e8183826..87e1a549dc 100644 --- a/test/intl402/Intl/getCanonicalLocales/non-iana-canon.js +++ b/test/intl402/Intl/getCanonicalLocales/non-iana-canon.js @@ -61,16 +61,12 @@ var testData = [ canonical: "cs", }, { - // ECMA-402 currently requires that variant subtags are not canonicalized. - // https://github.com/tc39/ecma402/issues/330 tag: "hy-arevela", - canonical: "hy-arevela", + canonical: "hy", }, { - // ECMA-402 currently requires that variant subtags are not canonicalized. - // https://github.com/tc39/ecma402/issues/330 tag: "hy-arevmda", - canonical: "hy-arevmda", + canonical: "hyw", }, ]; diff --git a/test/intl402/Intl/getCanonicalLocales/preferred-variant.js b/test/intl402/Intl/getCanonicalLocales/preferred-variant.js index df28a73fe4..e4188ba696 100644 --- a/test/intl402/Intl/getCanonicalLocales/preferred-variant.js +++ b/test/intl402/Intl/getCanonicalLocales/preferred-variant.js @@ -36,12 +36,10 @@ info: | includes: [testIntl.js] ---*/ -// Generated from http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry -// File-Date: 2017-08-15 +// Generated from https://github.com/unicode-org/cldr/blob/master/common/supplemental/supplementalMetadata.xml +// File-Date: 2020-03-30 var canonicalizedTags = { - // ECMA-402 currently requires that variant subtags are not canonicalized. - // https://github.com/tc39/ecma402/issues/330 - "ja-latn-hepburn-heploc": "ja-Latn-hepburn-heploc", + "ja-latn-hepburn-heploc": "ja-Latn-alalc97-hepburn", }; // make sure the data above is correct diff --git a/test/intl402/Locale/constructor-non-iana-canon.js b/test/intl402/Locale/constructor-non-iana-canon.js index e58516a197..8bc486dccf 100644 --- a/test/intl402/Locale/constructor-non-iana-canon.js +++ b/test/intl402/Locale/constructor-non-iana-canon.js @@ -79,18 +79,13 @@ 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-arevela", - maximized: "hy-Armn-AM-arevela", + canonical: "hy", + maximized: "hy-Armn-AM", }, { - // ECMA-402 currently requires that variant subtags are not canonicalized. - // https://github.com/tc39/ecma402/issues/330 tag: "hy-arevmda", - canonical: "hy-arevmda", - maximized: "hy-Armn-AM-arevmda", + canonical: "hyw", }, ];