summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/test/captured_subprocess_output.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/test/captured_subprocess_output.ts')
-rw-r--r--cli/tests/testdata/test/captured_subprocess_output.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/cli/tests/testdata/test/captured_subprocess_output.ts b/cli/tests/testdata/test/captured_subprocess_output.ts
new file mode 100644
index 000000000..277ac340e
--- /dev/null
+++ b/cli/tests/testdata/test/captured_subprocess_output.ts
@@ -0,0 +1,23 @@
+Deno.test("output", async () => {
+ const p = Deno.run({
+ cmd: [Deno.execPath(), "eval", "console.log(1); console.error(2);"],
+ });
+ await p.status();
+ await p.close();
+ Deno.spawnSync(Deno.execPath(), {
+ args: ["eval", "console.log(3); console.error(4);"],
+ stdout: "inherit",
+ stderr: "inherit",
+ });
+ await Deno.spawn(Deno.execPath(), {
+ args: ["eval", "console.log(5); console.error(6);"],
+ stdout: "inherit",
+ stderr: "inherit",
+ });
+ const c = await Deno.spawnChild(Deno.execPath(), {
+ args: ["eval", "console.log(7); console.error(8);"],
+ stdout: "inherit",
+ stderr: "inherit",
+ });
+ await c.status;
+});