summaryrefslogtreecommitdiff
path: root/test/parallel/test-intl.js
diff options
context:
space:
mode:
authorSteven R. Loomis <srloomis@us.ibm.com>2019-04-25 09:09:42 -0700
committerMichaël Zasso <targos@protonmail.com>2019-04-27 11:40:16 +0200
commit617c55ebe510adb06e511016bd054840e593c760 (patch)
tree6fd2b0514f74f872cfbbc4dd7d3912f4e6d7566a /test/parallel/test-intl.js
parentf4c77f9118327da5cbd29656a93f08de7ea5b74a (diff)
downloadandroid-node-v8-617c55ebe510adb06e511016bd054840e593c760.tar.gz
android-node-v8-617c55ebe510adb06e511016bd054840e593c760.tar.bz2
android-node-v8-617c55ebe510adb06e511016bd054840e593c760.zip
deps: backport ICU-20558 to fix Intl crasher
- Floating patch for ICU 63.x and 64.x - fixing crash in Intl when ICU data not found. - Regression test from refack included. Background: - ICU-13778 (landed in ICU 63.1) fixed a bug but added a regression. - a recent v8 land in Node v12 (which one?) exposes this bug to cause a crash when ICU data is not found. ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558 Backport of: https://github.com/unicode-org/icu/pull/632 Fixes: https://github.com/nodejs/node/issues/27379 Co-authored-by: Refael Ackermann <refack@gmail.com> PR-URL: https://github.com/nodejs/node/pull/27415 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'test/parallel/test-intl.js')
-rw-r--r--test/parallel/test-intl.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-intl.js b/test/parallel/test-intl.js
index 7e248bea1d..ef6491c35a 100644
--- a/test/parallel/test-intl.js
+++ b/test/parallel/test-intl.js
@@ -22,6 +22,7 @@
'use strict';
const common = require('../common');
const assert = require('assert');
+const { execFile } = require('child_process');
// Does node think that i18n was enabled?
let enablei18n = process.config.variables.v8_enable_i18n_support;
@@ -125,4 +126,14 @@ if (!common.hasIntl) {
assert.strictEqual(coll.compare('Bluebird', 'bluebird'), 0);
// `ffi` ligature (contraction)
assert.strictEqual(coll.compare('\ufb03', 'ffi'), 0);
+
+ {
+ // Regression test for https://github.com/nodejs/node/issues/27379
+ const env = { ...process.env, LC_ALL: 'ja' };
+ execFile(
+ process.execPath, ['-p', 'new Date().toLocaleString()'],
+ { env },
+ common.mustCall((e) => assert.ifError(e))
+ );
+ }
}