Skip to content
Snippets Groups Projects
Commit dde5d8e5 authored by Frank Yung-Fong Tang's avatar Frank Yung-Fong Tang Committed by Rick Waldron
Browse files

Fix invalidLanguageTags array

parent 72381359
No related branches found
No related tags found
No related merge requests found
...@@ -43,15 +43,15 @@ for (const [langtag, canonical] of Object.entries(validLanguageTags)) { ...@@ -43,15 +43,15 @@ for (const [langtag, canonical] of Object.entries(validLanguageTags)) {
} }
// unicode_language_subtag = alpha{2,3} | alpha{5,8}; // unicode_language_subtag = alpha{2,3} | alpha{5,8};
const invalidLanguageTags = { const invalidLanguageTags = [
"X-u-foo", "X-u-foo",
"Flob", "Flob",
"ZORK", "ZORK",
"Blah-latn", "Blah-latn",
"QuuX-latn-us", "QuuX-latn-us",
"SPAM-gb-x-Sausages-BACON-eggs", "SPAM-gb-x-Sausages-BACON-eggs",
}; ];
for (const langtag of Object.entries(invalidLanguageTags)) { for (const langtag of invalidLanguageTags) {
assert.throws(RangeError, () => new Intl.Locale(langtag)); assert.throws(RangeError, () => new Intl.Locale(langtag));
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment