test: fix faulty relpath test

PR-URL: https://github.com/nodejs/node/pull/20954
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Gus Caplan 2018-05-24 19:32:50 -05:00
parent 42be4c3bef
commit 9cd932f435
No known key found for this signature in database
GPG Key ID: F00BD11880E82F0E

View File

@ -3,11 +3,17 @@ const common = require('../common');
const assert = require('assert');
const fs = require('fs');
if (!common.isOSX) common.skip('MacOS-only test.');
const filename = __filename.toLowerCase();
assert.strictEqual(fs.realpathSync.native('/users'), '/Users');
fs.realpath.native('/users', common.mustCall(function(err, res) {
assert.ifError(err);
assert.strictEqual(res, '/Users');
assert.strictEqual(this, undefined);
}));
assert.strictEqual(
fs.realpathSync.native('./test/parallel/test-fs-realpath-native.js')
.toLowerCase(),
filename);
fs.realpath.native(
'./test/parallel/test-fs-realpath-native.js',
common.mustCall(function(err, res) {
assert.ifError(err);
assert.strictEqual(res.toLowerCase(), filename);
assert.strictEqual(this, undefined);
}));