diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/node_compat/test/parallel/test-stdin-from-file-spawn.js | 4 | ||||
-rw-r--r-- | cli/tests/unit_node/child_process_test.ts | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/cli/tests/node_compat/test/parallel/test-stdin-from-file-spawn.js b/cli/tests/node_compat/test/parallel/test-stdin-from-file-spawn.js index 89a0860a3..2f6b41898 100644 --- a/cli/tests/node_compat/test/parallel/test-stdin-from-file-spawn.js +++ b/cli/tests/node_compat/test/parallel/test-stdin-from-file-spawn.js @@ -5,7 +5,7 @@ // Taken from Node 18.8.0 // This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually -// TODO(cjihrig): 'run -A require.ts' should not be needed in +// TODO(cjihrig): 'run -A runner.ts' should not be needed in // execSync() call at the bottom of this test. 'use strict'; @@ -49,4 +49,4 @@ setTimeout(() => { }, 100); `); -execSync(`${process.argv[0]} run -A require.ts ${tmpJsFile} < ${tmpCmdFile}`); +execSync(`${process.argv[0]} run -A runner.ts ${tmpJsFile} < ${tmpCmdFile}`); diff --git a/cli/tests/unit_node/child_process_test.ts b/cli/tests/unit_node/child_process_test.ts index d226319e6..d5d41125d 100644 --- a/cli/tests/unit_node/child_process_test.ts +++ b/cli/tests/unit_node/child_process_test.ts @@ -722,3 +722,12 @@ Deno.test(function spawnSyncStdioUndefined() { assertEquals(ret.stdout.toString("utf-8").trim(), "hello"); assertEquals(ret.stderr.toString("utf-8").trim(), "world"); }); + +Deno.test(function spawnSyncExitNonZero() { + const ret = spawnSync( + `"${Deno.execPath()}" eval "Deno.exit(22)"`, + { shell: true }, + ); + + assertEquals(ret.status, 22); +}); |