diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-03-24 11:25:53 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-24 06:55:53 +0100 |
commit | ec9342f95a950ac13f57c85ef577e3bbab180e1a (patch) | |
tree | 33ee60bd9d8f24b0df268acda8a4a2ff02bb1d67 /tests/unit_node | |
parent | c940205353bd4401eecc757c7b18f12cfbdc5878 (diff) |
fix(ext/node): handle `null` in stdio array (#23048)
Fixes https://github.com/denoland/deno/issues/23045
Diffstat (limited to 'tests/unit_node')
-rw-r--r-- | tests/unit_node/child_process_test.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit_node/child_process_test.ts b/tests/unit_node/child_process_test.ts index 36d9d4345..6a1d1dbc5 100644 --- a/tests/unit_node/child_process_test.ts +++ b/tests/unit_node/child_process_test.ts @@ -810,3 +810,16 @@ Deno.test(async function spawnCommandNotFoundErrno() { }); await promise; }); + +// https://github.com/denoland/deno/issues/23045 +Deno.test(function spawnCommandNullStdioArray() { + const ret = spawnSync( + `"${Deno.execPath()}" eval "console.log('hello');console.error('world')"`, + { + stdio: [null, null, null], + shell: true, + }, + ); + + assertEquals(ret.status, 0); +}); |