Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-regress-GH-3542.js « sequential « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5411e1ca71db25edbd8b654c4eeba6a0b7b8763f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This test is only relevant on Windows.
if (process.platform !== 'win32') {
  return process.exit(0);
}

var common = require('../common.js'),
    assert = require('assert'),
    fs = require('fs'),
    path = require('path'),
    succeeded = 0;

function test(p) {
  var result = fs.realpathSync(p);
  assert.strictEqual(result, path.resolve(p));

  fs.realpath(p, function(err, result) {
    assert.ok(!err);
    assert.strictEqual(result, path.resolve(p));
    succeeded++;
  });
}

test('//localhost/c$/windows/system32');
test('//localhost/c$/windows');
test('//localhost/c$/')
test('\\\\localhost\\c$')
test('c:\\');
test('c:');
test(process.env.windir);

process.on('exit', function() {
  assert.strictEqual(succeeded, 7);
});