mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
chore(cli): Don't assume deno is in path for spawn_kill_permissions (#19198)
We don't need to use the `deno` command here to test kill permissions and it's awkward to get right without passing `-A`. `cat` works, but for platforms other than windows. This test should have plenty of coverage on other platforms.
This commit is contained in:
parent
19f1823e44
commit
5c349039b8
2 changed files with 4 additions and 3 deletions
|
@ -3434,8 +3434,9 @@ itest!(test_and_bench_are_noops_in_run {
|
|||
output_str: Some(""),
|
||||
});
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
itest!(spawn_kill_permissions {
|
||||
args: "run --quiet --unstable --allow-run=deno spawn_kill_permissions.ts",
|
||||
args: "run --quiet --unstable --allow-run=cat spawn_kill_permissions.ts",
|
||||
output_str: Some(""),
|
||||
});
|
||||
|
||||
|
|
4
cli/tests/testdata/spawn_kill_permissions.ts
vendored
4
cli/tests/testdata/spawn_kill_permissions.ts
vendored
|
@ -1,5 +1,5 @@
|
|||
const child = new Deno.Command("deno", {
|
||||
args: ["eval", "await new Promise(r => setTimeout(r, 2000))"],
|
||||
const child = new Deno.Command("cat", {
|
||||
args: ["-"],
|
||||
stdout: "null",
|
||||
stderr: "null",
|
||||
}).spawn();
|
||||
|
|
Loading…
Reference in a new issue