From c3a326ace810e7c80a4e1b8df8c8b704ed223c28 Mon Sep 17 00:00:00 2001 From: Frank Yung-Fong Tang Date: Wed, 26 Jun 2024 17:40:01 -0700 Subject: [PATCH] Add test for ECMA402 PR833 Allow locale based ignorePunctuation default (#3922) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * Update test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js Co-authored-by: André Bargull --------- Co-authored-by: André Bargull --- .../resolvedOptions/ignorePunctuation-default.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js diff --git a/test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js b/test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js new file mode 100644 index 0000000000..ffb80c0ba9 --- /dev/null +++ b/test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js @@ -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");