blob: 2de630189c551195553dfde699dbe8fac15ad391 [file] [log] [blame]
Roman Reissf29762f2015-05-19 11:00:061'use strict';
isaacsbbcb8b32013-02-18 18:46:502var assert = require('assert');
3var path = require('path');
4var common = require('../common');
Author: Igor Zinkovsky1f16a7b2011-11-25 08:29:065
Sakthipriyan Vairamanid5ab92b2015-07-29 11:48:046if (common.isWindows) {
Author: Igor Zinkovsky1f16a7b2011-11-25 08:29:067 var file = path.join(common.fixturesDir, 'a.js');
8 var resolvedFile = path.resolve(file);
Author: Igor Zinkovsky1f16a7b2011-11-25 08:29:069
10 assert.equal('\\\\?\\' + resolvedFile, path._makeLong(file));
11 assert.equal('\\\\?\\' + resolvedFile, path._makeLong('\\\\?\\' + file));
12 assert.equal('\\\\?\\UNC\\someserver\\someshare\\somefile',
Bert Belder892056b2012-01-17 19:16:4913 path._makeLong('\\\\someserver\\someshare\\somefile'));
Author: Igor Zinkovsky1f16a7b2011-11-25 08:29:0614 assert.equal('\\\\?\\UNC\\someserver\\someshare\\somefile',
Bert Belder892056b2012-01-17 19:16:4915 path._makeLong('\\\\?\\UNC\\someserver\\someshare\\somefile'));
16 assert.equal('\\\\.\\pipe\\somepipe',
17 path._makeLong('\\\\.\\pipe\\somepipe'));
Author: Igor Zinkovsky1f16a7b2011-11-25 08:29:0618}
isaacsbbcb8b32013-02-18 18:46:5019
20assert.equal(path._makeLong(null), null);
21assert.equal(path._makeLong(100), 100);
22assert.equal(path._makeLong(path), path);
23assert.equal(path._makeLong(false), false);
24assert.equal(path._makeLong(true), true);