diff options
author | Moonchild <moonchild@palemoon.org> | 2023-07-07 19:41:06 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-07-07 19:41:06 +0200 |
commit | ea9077a8a5fd8b9f7d5397d18e84aa20fb87f406 (patch) | |
tree | 64c21104a540df2812482dcc520952869db04ebf /js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js | |
parent | b4af6b6265ed489acbc3dc5a2fd9d4ed7f783b13 (diff) | |
parent | af5dbfc12003e61f21d2a7c71f239d18ae3945cf (diff) | |
download | uxp-RC_20230707.tar.gz |
Merge branch 'master' into releaseRC_20230707RB_20230711
Diffstat (limited to 'js/src/tests/non262/Intl/unicode-bcp47-locale-ids-variants-sorted.js')
-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); |