summaryrefslogtreecommitdiff
path: root/std/fs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-28 12:35:23 -0400
committerGitHub <noreply@github.com>2020-04-28 12:35:23 -0400
commite0ca60e7707b5896ce67301aefd1de4a76e3cf75 (patch)
tree4c5357a3d3482b14cbc3773374aa885e1e29e90c /std/fs
parentf7ab19b1b7ba929f7fd1550e2e4ecebe91cd9ea3 (diff)
BREAKING: Use LLVM target triple for Deno.build (#4948)
Deno.build.os values have changed to correspond to standard LLVM target triples "win" -> "windows" "mac" -> "darwin"
Diffstat (limited to 'std/fs')
-rw-r--r--std/fs/copy_test.ts2
-rw-r--r--std/fs/ensure_symlink_test.ts2
-rw-r--r--std/fs/walk_test.ts6
3 files changed, 4 insertions, 6 deletions
diff --git a/std/fs/copy_test.ts b/std/fs/copy_test.ts
index 5323ac9e4..1f3330226 100644
--- a/std/fs/copy_test.ts
+++ b/std/fs/copy_test.ts
@@ -15,7 +15,7 @@ import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts";
const testdataDir = path.resolve("fs", "testdata");
// TODO(axetroy): Add test for Windows once symlink is implemented for Windows.
-const isWindows = Deno.build.os === "win";
+const isWindows = Deno.build.os === "windows";
function testCopy(name: string, cb: (tempDir: string) => Promise<void>): void {
Deno.test({
diff --git a/std/fs/ensure_symlink_test.ts b/std/fs/ensure_symlink_test.ts
index 2264a6c37..5fda1c86a 100644
--- a/std/fs/ensure_symlink_test.ts
+++ b/std/fs/ensure_symlink_test.ts
@@ -9,7 +9,7 @@ import * as path from "../path/mod.ts";
import { ensureSymlink, ensureSymlinkSync } from "./ensure_symlink.ts";
const testdataDir = path.resolve("fs", "testdata");
-const isWindows = Deno.build.os === "win";
+const isWindows = Deno.build.os === "windows";
Deno.test("ensureSymlinkIfItNotExist", async function (): Promise<void> {
const testDir = path.join(testdataDir, "link_file_1");
diff --git a/std/fs/walk_test.ts b/std/fs/walk_test.ts
index b054db4cf..ea9a33773 100644
--- a/std/fs/walk_test.ts
+++ b/std/fs/walk_test.ts
@@ -3,8 +3,6 @@ const { remove } = Deno;
import { walk, walkSync, WalkOptions, WalkEntry } from "./walk.ts";
import { assert, assertEquals, assertThrowsAsync } from "../testing/asserts.ts";
-const isWindows = Deno.build.os == "win";
-
export function testWalk(
setup: (arg0: string) => void | Promise<void>,
t: () => void | Promise<void>,
@@ -254,13 +252,13 @@ testWalk(
try {
await symlink(d + "/b", d + "/a/bb");
} catch (err) {
- assert(isWindows);
+ assert(Deno.build.os == "windows");
assertEquals(err.message, "Not implemented");
}
},
async function symlink(): Promise<void> {
// symlink is not yet implemented on Windows.
- if (isWindows) {
+ if (Deno.build.os == "windows") {
return;
}