diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-06-10 12:35:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 12:35:38 -0400 |
commit | 9d706d71b55ca254d1bbd87754533a60142d2a6a (patch) | |
tree | 849a6b2d068515ee04a2e181362a1a7334ed4bdf | |
parent | 26a97a1f3bff2ad1a2f1013efdaeb9be953e6b52 (diff) |
chore: Fix broken test on Windows (#10900)
-rw-r--r-- | cli/tests/089_run_allow_list.ts | 2 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 2 | ||||
-rw-r--r-- | test_util/src/lib.rs | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/cli/tests/089_run_allow_list.ts b/cli/tests/089_run_allow_list.ts index 85c1730a1..defb3196f 100644 --- a/cli/tests/089_run_allow_list.ts +++ b/cli/tests/089_run_allow_list.ts @@ -7,7 +7,7 @@ try { } const proc = Deno.run({ - cmd: ["cat", "089_run_allow_list.ts"], + cmd: ["curl", "--help"], stdout: "null", }); console.log((await proc.status()).success); diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 261ba30a9..ede2b5542 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -3115,7 +3115,7 @@ console.log("finish"); }); itest!(_089_run_allow_list { - args: "run --allow-run=cat 089_run_allow_list.ts", + args: "run --allow-run=curl 089_run_allow_list.ts", output: "089_run_allow_list.ts.out", }); diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index db0114b8c..68a407dda 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -76,7 +76,10 @@ lazy_static! { } pub fn root_path() -> PathBuf { - PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/..")) + PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"))) + .parent() + .unwrap() + .to_path_buf() } pub fn prebuilt_path() -> PathBuf { |