mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1.0 KiB
25 lines
1.0 KiB
'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.strictEqual('\\\\?\\' + resolvedFile, path._makeLong(file));
|
|
assert.strictEqual('\\\\?\\' + resolvedFile, path._makeLong('\\\\?\\' +
|
|
file));
|
|
assert.strictEqual('\\\\?\\UNC\\someserver\\someshare\\somefile',
|
|
path._makeLong('\\\\someserver\\someshare\\somefile'));
|
|
assert.strictEqual('\\\\?\\UNC\\someserver\\someshare\\somefile', path
|
|
._makeLong('\\\\?\\UNC\\someserver\\someshare\\somefile'));
|
|
assert.strictEqual('\\\\.\\pipe\\somepipe',
|
|
path._makeLong('\\\\.\\pipe\\somepipe'));
|
|
}
|
|
|
|
assert.strictEqual(path._makeLong(null), null);
|
|
assert.strictEqual(path._makeLong(100), 100);
|
|
assert.strictEqual(path._makeLong(path), path);
|
|
assert.strictEqual(path._makeLong(false), false);
|
|
assert.strictEqual(path._makeLong(true), true);
|
|
|