mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
test: fix on zfs build host
Signed-off-by: Marcel <me@m4rc3l.de> PR-URL: https://github.com/nodejs/node/pull/67517 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
472d501591
commit
01bdf3f4cc
2 files changed
+11
-2
No files matched your search
@@ -55,7 +55,15 @@ assert.throws(() => writeFileSync(testPath, 'test'), {
|
||||
name: 'URIError',
|
||||
});
|
||||
|
||||
writeFileSync(testPathBuffer, 'test');
|
||||
|
||||
try {
|
||||
writeFileSync(testPathBuffer, 'test');
|
||||
} catch (e) {
|
||||
// ZFS with utf8only=on (default) rejects non-UTF-8 file names
|
||||
if (e.code === 'EILSEQ')
|
||||
common.skip('test requires filesystem that accepts non-UTF-8 names');
|
||||
throw e;
|
||||
}
|
||||
assert.ok(existsSync(testPathBuffer));
|
||||
|
||||
// Using fileURLToPath fails because the URL contains non-Unicode
|
||||
|
||||
@@ -18,7 +18,8 @@ const fullpath = Buffer.concat([root, filebuff]);
|
||||
try {
|
||||
fs.closeSync(fs.openSync(fullpath, 'w+'));
|
||||
} catch (e) {
|
||||
if (e.code === 'EINVAL')
|
||||
// EILSEQ: ZFS with utf8only=on (default) rejects non-UTF-8 file names
|
||||
if (e.code === 'EINVAL' || e.code === 'EILSEQ')
|
||||
common.skip('test requires filesystem that supports UCS2');
|
||||
throw e;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user