mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 07:27:32 +00:00

Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
25 lines
962 B
JavaScript
25 lines
962 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const path = require('path');
|
|
|
|
if (common.isWindows) {
|
|
const file = path.join(common.fixturesDir, 'a.js');
|
|
const resolvedFile = path.resolve(file);
|
|
|
|
assert.equal('\\\\?\\' + resolvedFile, path._makeLong(file));
|
|
assert.equal('\\\\?\\' + resolvedFile, path._makeLong('\\\\?\\' + file));
|
|
assert.equal('\\\\?\\UNC\\someserver\\someshare\\somefile',
|
|
path._makeLong('\\\\someserver\\someshare\\somefile'));
|
|
assert.equal('\\\\?\\UNC\\someserver\\someshare\\somefile',
|
|
path._makeLong('\\\\?\\UNC\\someserver\\someshare\\somefile'));
|
|
assert.equal('\\\\.\\pipe\\somepipe',
|
|
path._makeLong('\\\\.\\pipe\\somepipe'));
|
|
}
|
|
|
|
assert.equal(path._makeLong(null), null);
|
|
assert.equal(path._makeLong(100), 100);
|
|
assert.equal(path._makeLong(path), path);
|
|
assert.equal(path._makeLong(false), false);
|
|
assert.equal(path._makeLong(true), true);
|