diff options
Diffstat (limited to 'std/examples/tests')
-rw-r--r-- | std/examples/tests/cat_test.ts | 1 | ||||
-rw-r--r-- | std/examples/tests/catj_test.ts | 2 | ||||
-rw-r--r-- | std/examples/tests/colors_test.ts | 2 | ||||
-rw-r--r-- | std/examples/tests/curl_test.ts | 8 | ||||
-rw-r--r-- | std/examples/tests/echo_server_test.ts | 2 | ||||
-rw-r--r-- | std/examples/tests/welcome_test.ts | 2 | ||||
-rw-r--r-- | std/examples/tests/xeval_test.ts | 4 |
7 files changed, 14 insertions, 7 deletions
diff --git a/std/examples/tests/cat_test.ts b/std/examples/tests/cat_test.ts index b12a6916f..4633c5750 100644 --- a/std/examples/tests/cat_test.ts +++ b/std/examples/tests/cat_test.ts @@ -6,6 +6,7 @@ Deno.test("[examples/cat] print multiple files", async () => { const process = Deno.run({ cmd: [ Deno.execPath(), + "run", "--allow-read", "cat.ts", "testdata/cat/hello.txt", diff --git a/std/examples/tests/catj_test.ts b/std/examples/tests/catj_test.ts index 53b36bef8..c3eb61f51 100644 --- a/std/examples/tests/catj_test.ts +++ b/std/examples/tests/catj_test.ts @@ -77,7 +77,7 @@ Deno.test("[examples/catj] read from stdin", async () => { function catj(...files: string[]): Deno.Process { return Deno.run({ - cmd: [Deno.execPath(), "--allow-read", "catj.ts", ...files], + cmd: [Deno.execPath(), "run", "--allow-read", "catj.ts", ...files], cwd: "examples", stdin: "piped", stdout: "piped", diff --git a/std/examples/tests/colors_test.ts b/std/examples/tests/colors_test.ts index ac779adb8..90c469c00 100644 --- a/std/examples/tests/colors_test.ts +++ b/std/examples/tests/colors_test.ts @@ -4,7 +4,7 @@ import { assertStrictEq } from "../../testing/asserts.ts"; Deno.test("[examples/colors] print a colored text", async () => { const decoder = new TextDecoder(); const process = Deno.run({ - cmd: [Deno.execPath(), "colors.ts"], + cmd: [Deno.execPath(), "run", "colors.ts"], cwd: "examples", stdout: "piped", }); diff --git a/std/examples/tests/curl_test.ts b/std/examples/tests/curl_test.ts index 9b2870216..69e0e52d6 100644 --- a/std/examples/tests/curl_test.ts +++ b/std/examples/tests/curl_test.ts @@ -14,7 +14,13 @@ Deno.test({ const decoder = new TextDecoder(); const process = Deno.run({ - cmd: [Deno.execPath(), "--allow-net", "curl.ts", "http://localhost:8081"], + cmd: [ + Deno.execPath(), + "run", + "--allow-net", + "curl.ts", + "http://localhost:8081", + ], cwd: "examples", stdout: "piped", }); diff --git a/std/examples/tests/echo_server_test.ts b/std/examples/tests/echo_server_test.ts index 9c413d737..3e6096190 100644 --- a/std/examples/tests/echo_server_test.ts +++ b/std/examples/tests/echo_server_test.ts @@ -6,7 +6,7 @@ Deno.test("[examples/echo_server]", async () => { const encoder = new TextEncoder(); const decoder = new TextDecoder(); const process = Deno.run({ - cmd: [Deno.execPath(), "--allow-net", "echo_server.ts"], + cmd: [Deno.execPath(), "run", "--allow-net", "echo_server.ts"], cwd: "examples", stdout: "piped", }); diff --git a/std/examples/tests/welcome_test.ts b/std/examples/tests/welcome_test.ts index cacb77ab9..d508773c5 100644 --- a/std/examples/tests/welcome_test.ts +++ b/std/examples/tests/welcome_test.ts @@ -4,7 +4,7 @@ import { assertStrictEq } from "../../testing/asserts.ts"; Deno.test("[examples/welcome] print a welcome message", async () => { const decoder = new TextDecoder(); const process = Deno.run({ - cmd: [Deno.execPath(), "welcome.ts"], + cmd: [Deno.execPath(), "run", "welcome.ts"], cwd: "examples", stdout: "piped", }); diff --git a/std/examples/tests/xeval_test.ts b/std/examples/tests/xeval_test.ts index 426f6fe56..eeeac7731 100644 --- a/std/examples/tests/xeval_test.ts +++ b/std/examples/tests/xeval_test.ts @@ -29,7 +29,7 @@ Deno.test({ name: "xevalCliReplvar", fn: async function (): Promise<void> { const p = run({ - cmd: [execPath(), xevalPath, "--replvar=abc", "console.log(abc)"], + cmd: [execPath(), "run", xevalPath, "--replvar=abc", "console.log(abc)"], stdin: "piped", stdout: "piped", stderr: "null", @@ -45,7 +45,7 @@ Deno.test({ Deno.test("xevalCliSyntaxError", async function (): Promise<void> { const p = run({ - cmd: [execPath(), xevalPath, "("], + cmd: [execPath(), "run", xevalPath, "("], stdin: "null", stdout: "piped", stderr: "piped", |