Skip to content

Commit

Permalink
test: replace localhost with os.hostname in fs-readfilesync
Browse files Browse the repository at this point in the history
PR-URL: #23101
Fixes: #21501
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
  • Loading branch information
lundibundi authored and targos committed Oct 3, 2018
1 parent d572f60 commit 23525b0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/parallel/test-fs-readfilesync-enoent.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if (!common.isWindows)

const assert = require('assert');
const fs = require('fs');
const os = require('os');
const path = require('path');

function test(p) {
Expand All @@ -23,10 +24,10 @@ function test(p) {
}));
}

test('//localhost/c$/Windows/System32');
test('//localhost/c$/Windows');
test('//localhost/c$/');
test('\\\\localhost\\c$\\');
test(`//${os.hostname()}/c$/Windows/System32`);
test(`//${os.hostname()}/c$/Windows`);
test(`//${os.hostname()}/c$/`);
test(`\\\\${os.hostname()}\\c$\\`);
test('C:\\');
test('C:');
test(process.env.windir);

0 comments on commit 23525b0

Please sign in to comment.