Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: replace localhost with os.hostname in fs-readfilesync
Fixes: #21501
  • Loading branch information
lundibundi committed Sep 26, 2018
commit 5768ae7fc518e197106ef02961433d79b3d6f3ad
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);