Add test for ECMA402 PR833 Allow locale based ignorePunctuation default (#3922)

* Add test for ECMA402 833

https://github.com/tc39/ecma402/pull/833

* Update test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js

Co-authored-by: André Bargull <andre.bargull@gmail.com>

* Update test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js

Co-authored-by: André Bargull <andre.bargull@gmail.com>

---------

Co-authored-by: André Bargull <andre.bargull@gmail.com>
This commit is contained in:
Frank Yung-Fong Tang 2024-06-26 17:40:01 -07:00 committed by GitHub
parent c2815ec090
commit c3a326ace8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
// Copyright 2023 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-initializecollator
description: resolved ignorePunctuation come from locale default instead of false.
locale: [en, th, ja]
---*/
assert.sameValue(
(new Intl.Collator("en")).resolvedOptions().ignorePunctuation,
false, "English default ignorePunctuation to false");
assert.sameValue(
(new Intl.Collator("th")).resolvedOptions().ignorePunctuation,
true, "Thai default ignorePunctuation to true");
assert.sameValue(
(new Intl.Collator("ja")).resolvedOptions().ignorePunctuation,
false, "Japanese default ignorePunctuation to false");