mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 18:44:40 +00:00

* Make common.skip() exit. Also add common.printSkipMessage() for partial skips. * Don't make needless things before skip PR-URL: https://github.com/nodejs/node/pull/14021 Fixes: https://github.com/nodejs/node/issues/14016 Reviewed-By: Refael Ackermann <refack@gmail.com>
28 lines
725 B
JavaScript
28 lines
725 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
// This test is only relevant on Windows.
|
|
if (!common.isWindows)
|
|
common.skip('Windows specific test.');
|
|
|
|
const assert = require('assert');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
function test(p) {
|
|
const result = fs.realpathSync(p);
|
|
assert.strictEqual(result.toLowerCase(), path.resolve(p).toLowerCase());
|
|
|
|
fs.realpath(p, common.mustCall(function(err, result) {
|
|
assert.ok(!err);
|
|
assert.strictEqual(result.toLowerCase(), path.resolve(p).toLowerCase());
|
|
}));
|
|
}
|
|
|
|
test('//localhost/c$/Windows/System32');
|
|
test('//localhost/c$/Windows');
|
|
test('//localhost/c$/');
|
|
test('\\\\localhost\\c$\\');
|
|
test('C:\\');
|
|
test('C:');
|
|
test(process.env.windir);
|