forked from tc39/test262
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the calenar name should be canonicalized Spec change tc39/ecma402#846
- Loading branch information
1 parent
0fd1675
commit bea8d86
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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 <a href="https://unicode.org/reports/tr35/#processing-localeids">Unicode Technical Standard #35 Part 1 Core, Annex C LocaleId Canonicalization Section 5 Canonicalizing Syntax, Processing LocaleIds</a>. | ||
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'"); |