mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
Call uc_init() after u_setDataDirectory() to find out if the data
directory is actually valid.
This commit removes parallel/test-intl-no-icu-data, added in commit
46345b9 ("src: make --icu-data-dir= switch testable"). It no longer
works now that an invalid --icu-data-dir= argument is rejected.
Coverage is now provided by parallel/test-icu-data-dir.
Fixes: https://github.com/nodejs/node/issues/13043
Refs: https://github.com/nodejs/node-gyp/issues/1199
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
20 lines
529 B
JavaScript
20 lines
529 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { spawnSync } = require('child_process');
|
|
|
|
const expected =
|
|
'could not initialize ICU ' +
|
|
'(check NODE_ICU_DATA or --icu-data-dir parameters)';
|
|
|
|
{
|
|
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));
|
|
}
|