diff options
author | Denys Otrishko <shishugi@gmail.com> | 2018-09-26 14:00:08 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-10-01 07:17:45 +0200 |
commit | 1be804d625e6904f053b09b9066ba32e0f48fa99 (patch) | |
tree | 4d5deab4599e5ccbe3b8e859583e82e95d4d5120 /test | |
parent | a79c88a4cec048faa770f512d7ada1671bf4bf77 (diff) | |
download | android-node-v8-1be804d625e6904f053b09b9066ba32e0f48fa99.tar.gz android-node-v8-1be804d625e6904f053b09b9066ba32e0f48fa99.tar.bz2 android-node-v8-1be804d625e6904f053b09b9066ba32e0f48fa99.zip |
test: replace localhost with os.hostname in fs-readfilesync
PR-URL: https://github.com/nodejs/node/pull/23101
Fixes: https://github.com/nodejs/node/issues/21501
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-fs-readfilesync-enoent.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/parallel/test-fs-readfilesync-enoent.js b/test/parallel/test-fs-readfilesync-enoent.js index 3d421e52b1..0369f35877 100644 --- a/test/parallel/test-fs-readfilesync-enoent.js +++ b/test/parallel/test-fs-readfilesync-enoent.js @@ -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) { @@ -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); |