summaryrefslogtreecommitdiff
path: root/deps/v8/test/intl/general/getCanonicalLocales.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/intl/general/getCanonicalLocales.js')
-rw-r--r--deps/v8/test/intl/general/getCanonicalLocales.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/v8/test/intl/general/getCanonicalLocales.js b/deps/v8/test/intl/general/getCanonicalLocales.js
index 0df6846ce6..65c7fc6e3a 100644
--- a/deps/v8/test/intl/general/getCanonicalLocales.js
+++ b/deps/v8/test/intl/general/getCanonicalLocales.js
@@ -7,7 +7,10 @@ assertDoesNotThrow(() => Intl.getCanonicalLocales("foobar-foobar"));
// Ignore duplicate subtags in different namespaces; eg, 'a' vs 'u'.
assertDoesNotThrow(() => Intl.getCanonicalLocales("en-a-ca-Chinese-u-ca-Chinese"));
+// Ignore duplicate subtags in U-extension as well. Only the first count.
+// See RFC 6067 for details.
+assertDoesNotThrow(() => Intl.getCanonicalLocales("en-u-ca-gregory-ca-chinese"));
+assertEquals("en-u-ca-gregory", Intl.getCanonicalLocales("en-u-ca-gregory-ca-chinese")[0]);
// Check duplicate subtags (after the first tag) are detected.
assertThrows(() => Intl.getCanonicalLocales("en-foobar-foobar"), RangeError);
-assertThrows(() => Intl.getCanonicalLocales("en-u-ca-gregory-ca-chinese"), RangeError);