-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: check if --icu-data-dir= points to valid dir
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: #13043 Refs: nodejs/node-gyp#1199 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
- Loading branch information
1 parent
6f21671
commit 46e773c
Showing
5 changed files
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'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)); | ||
} |
This file was deleted.
Oops, something went wrong.
46e773c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a PR-URL was not included in this commit
46e773c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was #13053.