summaryrefslogtreecommitdiff
path: root/cli/tests/unit/spawn_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/spawn_test.ts')
-rw-r--r--cli/tests/unit/spawn_test.ts27
1 files changed, 26 insertions, 1 deletions
diff --git a/cli/tests/unit/spawn_test.ts b/cli/tests/unit/spawn_test.ts
index df95e333b..149886a1c 100644
--- a/cli/tests/unit/spawn_test.ts
+++ b/cli/tests/unit/spawn_test.ts
@@ -733,7 +733,7 @@ const child = await Deno.spawnChild(Deno.execPath(), {
});
const readable = child.stdout.pipeThrough(new TextDecoderStream());
const reader = readable.getReader();
-// set up an interval that will end after reading a few messages from stdout,
+// set up an interval that will end after reading a few messages from stdout,
// to verify that stdio streams are properly unrefed
let count = 0;
let interval;
@@ -787,3 +787,28 @@ setInterval(() => {
}, Deno.errors.NotFound);
},
);
+
+Deno.test(
+ { ignore: Deno.build.os !== "windows" },
+ async function spawnWindowsRawArguments() {
+ let { success, stdout } = await Deno.spawn("cmd", {
+ args: ["/d", "/s", "/c", '"deno ^"--version^""'],
+ windowsRawArguments: true,
+ });
+ assert(success);
+ let stdoutText = new TextDecoder().decode(stdout);
+ assertStringIncludes(stdoutText, "deno");
+ assertStringIncludes(stdoutText, "v8");
+ assertStringIncludes(stdoutText, "typescript");
+
+ ({ success, stdout } = Deno.spawnSync("cmd", {
+ args: ["/d", "/s", "/c", '"deno ^"--version^""'],
+ windowsRawArguments: true,
+ }));
+ assert(success);
+ stdoutText = new TextDecoder().decode(stdout);
+ assertStringIncludes(stdoutText, "deno");
+ assertStringIncludes(stdoutText, "v8");
+ assertStringIncludes(stdoutText, "typescript");
+ },
+);