From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../Locale/prototype/calendar/canonicalize.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 js/src/tests/test262/intl402/Locale/prototype/calendar/canonicalize.js (limited to 'js/src/tests/test262/intl402/Locale/prototype/calendar/canonicalize.js') diff --git a/js/src/tests/test262/intl402/Locale/prototype/calendar/canonicalize.js b/js/src/tests/test262/intl402/Locale/prototype/calendar/canonicalize.js new file mode 100644 index 0000000000..5ade4fe795 --- /dev/null +++ b/js/src/tests/test262/intl402/Locale/prototype/calendar/canonicalize.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-apply-unicode-extension-to-tag +description: Checks canonicalize value of extension in ApplyUnicodeExtensionToTag. +info: | + ApplyUnicodeExtensionToTag + 1. Let _optionsUValue_ be the ASCII-lowercase of _optionsValue_. + 1. Set _value_ to the String value resulting from canonicalizing _optionsUValue_ as a value of key _key_ per Unicode Technical Standard #35 Part 1 Core, Annex C LocaleId Canonicalization Section 5 Canonicalizing Syntax, Processing LocaleIds. +features: [Intl.Locale] +---*/ + +const loc = new Intl.Locale('en', {calendar: 'islamicc'}); + +assert.sameValue(loc.toString(), "en-u-ca-islamic-civil", + "'islamicc' should be canonicalize to 'islamic-civil'"); + +assert.sameValue(loc.calendar, "islamic-civil", + "'islamicc' should be canonicalize to 'islamic-civil'"); + +reportCompare(0, 0); -- cgit v1.2.3