diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js b/js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js new file mode 100644 index 0000000000..e50436a83c --- /dev/null +++ b/js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js @@ -0,0 +1,31 @@ +// |reftest| skip-if(!this.hasOwnProperty("Intl")) + +// UTS 35, 3.2.1 Canonical Unicode Locale Identifiers: +// - Any variants are in alphabetical order. + +assertEq(Intl.getCanonicalLocales("en-scouse-fonipa")[0], "en-fonipa-scouse"); + +// Sorting in alphabetical order may turn a valid BCP 47 language tag into a +// BCP 47 language tag which is only well-formed, but no longer valid. This +// means there are potential compatibility issues when converting between +// Unicode BCP 47 locale identifiers and BCP 47 language tags. +// +// Spec: https://tools.ietf.org/html/rfc5646#section-2.2.9 + +// <https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry> +// +// Type: variant +// Subtag: 1994 +// Description: Standardized Resian orthography +// Added: 2007-07-28 +// Prefix: sl-rozaj +// Prefix: sl-rozaj-biske +// Prefix: sl-rozaj-njiva +// Prefix: sl-rozaj-osojs +// Prefix: sl-rozaj-solba +// Comments: For standardized Resian an orthography was published in 1994. + +assertEq(Intl.getCanonicalLocales("sl-rozaj-biske-1994")[0], "sl-1994-biske-rozaj"); + +if (typeof reportCompare === "function") + reportCompare(true, true); |