Test that Intl.Locale language "root" is rejected

cf. https://unicode.org/reports/tr35/#unicode_bcp47_locale_id
This commit is contained in:
Richard Gibson 2025-05-30 14:02:49 -04:00 committed by Philip Chimento
parent a4501647e3
commit fbc6833c24

View File

@ -39,6 +39,11 @@ const invalidLanguageOptions = [
"notalanguage", "notalanguage",
"undefined", "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. // Value contains more than just the 'language' production.
"fr-Latn", "fr-Latn",
"fr-FR", "fr-FR",