From fbc6833c24c16a2b7d88fa280d9a3f0f388b9002 Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 30 May 2025 14:02:49 -0400 Subject: [PATCH] Test that Intl.Locale language "root" is rejected cf. https://unicode.org/reports/tr35/#unicode_bcp47_locale_id --- test/intl402/Locale/constructor-options-language-invalid.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/intl402/Locale/constructor-options-language-invalid.js b/test/intl402/Locale/constructor-options-language-invalid.js index fcc424fbd1..881ef622d2 100644 --- a/test/intl402/Locale/constructor-options-language-invalid.js +++ b/test/intl402/Locale/constructor-options-language-invalid.js @@ -39,6 +39,11 @@ const invalidLanguageOptions = [ "notalanguage", "undefined", + // "root" is treated as a special `unicode_language_subtag`, but is not + // actually one and is not valid in a Unicode BCP 47 locale identifier. + // https://unicode.org/reports/tr35/#unicode_bcp47_locale_id + "root", + // Value contains more than just the 'language' production. "fr-Latn", "fr-FR",