mirror of https://github.com/tc39/test262.git
Fix invalidLanguageTags array
This commit is contained in:
parent
7238135940
commit
dde5d8e546
|
@ -43,15 +43,15 @@ for (const [langtag, canonical] of Object.entries(validLanguageTags)) {
|
|||
}
|
||||
|
||||
// unicode_language_subtag = alpha{2,3} | alpha{5,8};
|
||||
const invalidLanguageTags = {
|
||||
const invalidLanguageTags = [
|
||||
"X-u-foo",
|
||||
"Flob",
|
||||
"ZORK",
|
||||
"Blah-latn",
|
||||
"QuuX-latn-us",
|
||||
"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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue