-
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.
PR-URL: #38101 Fixes: #37951 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
1 parent
349fffc
commit 21d777b
Showing
4 changed files
with
57 additions
and
0 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,24 @@ | ||
// Flags: --expose-internals | ||
'use strict'; | ||
|
||
require('../common'); | ||
const assert = require('assert'); | ||
const { | ||
getSystemErrorMap, | ||
_errnoException | ||
} = require('util'); | ||
|
||
const { internalBinding } = require('internal/test/binding'); | ||
const uv = internalBinding('uv'); | ||
const uvKeys = Object.keys(uv); | ||
|
||
const errMap = getSystemErrorMap(); | ||
|
||
uvKeys.forEach((key) => { | ||
if (!key.startsWith('UV_')) | ||
return; | ||
|
||
const err = _errnoException(uv[key]); | ||
const name = uv.errname(uv[key]); | ||
assert.strictEqual(errMap.get(err.errno)[0], name); | ||
}); |