mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 13:28:42 +00:00

This commit adds a test to verify that the path argument to ErrnoException can contain UTF-8 characters. PR-URL: https://github.com/nodejs/node/pull/13958 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
16 lines
468 B
JavaScript
16 lines
468 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
|
|
// Verify that the path argument to node::ErrnoException() can contain UTF-8
|
|
// characters.
|
|
|
|
const assert = require('assert');
|
|
const binding = require(`./build/${common.buildType}/binding`);
|
|
const err = binding.errno();
|
|
|
|
assert.strictEqual(err.syscall, 'syscall');
|
|
assert.strictEqual(err.errno, 10);
|
|
assert.strictEqual(err.path, 'päth');
|
|
assert.ok(/^Error:\s\w+, some error msg 'päth'$/.test(err.toString()));
|