Skip to content

Commit 50648d6

Browse files
committed
test: disable fs-readfile-error on FreeBSD
FreeBSD does not return EISDIR when reading "/". PR-URL: #332 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 27e9ed6 commit 50648d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parallel/test-fs-readfile-error.js

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ var assert = require('assert');
33
var exec = require('child_process').exec;
44
var path = require('path');
55

6+
// `fs.readFile('/')` does not fail on FreeBSD, because you can open and read
7+
// the directory there.
8+
if (process.platform === 'freebsd') {
9+
console.error('Skipping test, platform not supported.');
10+
process.exit();
11+
}
12+
613
var callbacks = 0;
714

815
function test(env, cb) {

0 commit comments

Comments
 (0)