summaryrefslogtreecommitdiff
path: root/cli/tests/unit/os_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/os_test.ts')
-rw-r--r--cli/tests/unit/os_test.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/unit/os_test.ts b/cli/tests/unit/os_test.ts
index a7329ddb4..04ddf8ae0 100644
--- a/cli/tests/unit/os_test.ts
+++ b/cli/tests/unit/os_test.ts
@@ -208,6 +208,18 @@ Deno.test(
},
);
+Deno.test(
+ { permissions: { run: [Deno.execPath()], read: true } },
+ // See https://github.com/denoland/deno/issues/16527
+ async function hostnameWithoutOtherNetworkUsages() {
+ const { stdout } = await Deno.spawn(Deno.execPath(), {
+ args: ["eval", "-p", "Deno.hostname()"],
+ });
+ const hostname = new TextDecoder().decode(stdout).trim();
+ assert(hostname.length > 0);
+ },
+);
+
Deno.test({ permissions: { sys: false } }, function hostnamePerm() {
assertThrows(() => {
Deno.hostname();