mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
PR-URL: https://github.com/nodejs/node/pull/14342 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
24 lines
656 B
JavaScript
24 lines
656 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const os = require('os');
|
|
if (!(common.hasIntl && common.hasSmallICU))
|
|
common.skip('missing Intl');
|
|
|
|
const assert = require('assert');
|
|
const { spawnSync } = require('child_process');
|
|
|
|
const expected =
|
|
'could not initialize ICU (check NODE_ICU_DATA or ' +
|
|
`--icu-data-dir parameters)${os.EOL}`;
|
|
|
|
{
|
|
const child = spawnSync(process.execPath, ['--icu-data-dir=/', '-e', '0']);
|
|
assert(child.stderr.toString().includes(expected));
|
|
}
|
|
|
|
{
|
|
const env = { NODE_ICU_DATA: '/' };
|
|
const child = spawnSync(process.execPath, ['-e', '0'], { env });
|
|
assert(child.stderr.toString().includes(expected));
|
|
}
|