diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2018-08-07 21:37:12 +0300 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-11-29 19:39:08 +0300 |
commit | 1bed1107c7a6657c1635889d62923e2a96995ac2 (patch) | |
tree | 59c2a10361776168143d1097ef6e91d6a426fafa /test | |
parent | 070d87af65b43865c9d5440e27f9e26219307a03 (diff) |
deps: icu: apply workaround patch
ICU 62.1 had a bug where certain orders of operations would not
work with the minimum significant digit setting. Fixed in
ICU 63.1. Applied the following patch from v8.
https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1128503
ICU Bug:
https://unicode-org.atlassian.net/browse/ICU-20063
Fixes: https://github.com/nodejs/node/issues/22156
PR-URL: https://github.com/nodejs/node/pull/23764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-intl.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js index 618e8c49bce..c55f554b00f 100644 --- a/test/parallel/test-intl.js +++ b/test/parallel/test-intl.js @@ -99,8 +99,18 @@ if (!common.hasIntl) { assert.strictEqual(localeString, '1/1/1970, 12:00:00 AM'); } // number format - const numberFormat = new Intl.NumberFormat(['en']).format(12345.67890); - assert.strictEqual(numberFormat, '12,345.679'); + { + const numberFormat = new Intl.NumberFormat(['en']).format(12345.67890); + assert.strictEqual(numberFormat, '12,345.679'); + } + // Significant Digits + { + const loc = ['en-US']; + const opts = { maximumSignificantDigits: 4 }; + const num = 10.001; + const numberFormat = new Intl.NumberFormat(loc, opts).format(num); + assert.strictEqual(numberFormat, '10'); + } const collOpts = { sensitivity: 'base', ignorePunctuation: true }; const coll = new Intl.Collator(['en'], collOpts); |