From e666b01e0980b7bfe0b52e6b9876bd61599d5e56 Mon Sep 17 00:00:00 2001 From: David Peter Date: Tue, 22 Feb 2022 22:15:15 +0100 Subject: [PATCH] Add simple integation test for --shell=none --- tests/integration_tests.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 349dae6..aa02555 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -10,7 +10,7 @@ pub fn hyperfine_debug() -> assert_cmd::Command { } #[test] -fn hyperfine_runs_successfully() { +fn runs_successfully() { hyperfine() .arg("--runs=2") .arg("echo dummy benchmark") @@ -27,6 +27,18 @@ fn one_run_is_supported() { .success(); } +#[test] +fn can_run_commands_without_a_shell() { + hyperfine() + .arg("--runs=1") + .arg("--show-output") + .arg("--shell=none") + .arg("echo 'hello world' argument2") + .assert() + .success() + .stdout(predicate::str::contains("hello world argument2")); +} + #[test] fn fails_with_wrong_number_of_command_name_arguments() { hyperfine()