diff --git a/crates/oxide_cli/tests/cli_e2e_tests.rs b/crates/oxide_cli/tests/cli_e2e_tests.rs index 88545b36..cf4fdcad 100644 --- a/crates/oxide_cli/tests/cli_e2e_tests.rs +++ b/crates/oxide_cli/tests/cli_e2e_tests.rs @@ -1,8 +1,8 @@ use std::process::Command; fn run_eval(js: &str) -> std::process::Output { - Command::new("cargo") - .args(["run", "--", "eval", js]) + Command::new(env!("CARGO_BIN_EXE_oxide")) + .args(["eval", js]) .output() .expect("failed to run oxide eval") } diff --git a/crates/oxide_cli/tests/cli_smoke.rs b/crates/oxide_cli/tests/cli_smoke.rs index 4b088d99..282bca71 100644 --- a/crates/oxide_cli/tests/cli_smoke.rs +++ b/crates/oxide_cli/tests/cli_smoke.rs @@ -2,8 +2,8 @@ use std::process::Command; #[test] fn eval_simple_expression() { - let output = Command::new("cargo") - .args(["run", "--", "eval", "1 + 2"]) + let output = Command::new(env!("CARGO_BIN_EXE_oxide")) + .args(["eval", "1 + 2"]) .output() .expect("failed to run oxide eval"); @@ -14,8 +14,8 @@ fn eval_simple_expression() { #[test] fn eval_syntax_error() { - let output = Command::new("cargo") - .args(["run", "--", "eval", "function("]) + let output = Command::new(env!("CARGO_BIN_EXE_oxide")) + .args(["eval", "function("]) .output() .expect("failed to run oxide eval"); @@ -27,8 +27,8 @@ fn eval_syntax_error() { #[test] fn run_file() { let fixture = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/fixtures/hello.js"); - let output = Command::new("cargo") - .args(["run", "--", "run", fixture]) + let output = Command::new(env!("CARGO_BIN_EXE_oxide")) + .args(["run", fixture]) .output() .expect("failed to run oxide run"); @@ -39,8 +39,8 @@ fn run_file() { #[test] fn bench_help() { - let output = Command::new("cargo") - .args(["run", "--", "bench", "--help"]) + let output = Command::new(env!("CARGO_BIN_EXE_oxide")) + .args(["bench", "--help"]) .output() .expect("failed to run oxide bench --help");