-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: fix winapi_strerror error string
Fixes: #23191 PR-URL: #55207 Reviewed-By: Luigi Pinca <[email protected]>
- Loading branch information
1 parent
551b8f8
commit 6ad23e7
Showing
2 changed files
with
29 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const child = require('child_process'); | ||
|
||
if (!common.isWindows) { | ||
common.skip('This test is specific to Windows to test winapi_strerror'); | ||
} | ||
|
||
// Ref: https://github.com/nodejs/node/issues/23191 | ||
// This test is specific to Windows. | ||
|
||
const cp = child.spawn('pwd'); | ||
|
||
cp.on('exit', common.mustCall(function() { | ||
try { | ||
process._debugProcess(cp.pid); | ||
} catch (error) { | ||
assert.strictEqual(error.message, 'The system cannot find the file specified.'); | ||
} | ||
})); |