Add simple integation test for --shell=none

This commit is contained in:
David Peter authored and David Peter committed 2022-02-22 22:51:09 +01:00
1 parent e38ac46179
commit e666b01e09
1 file changed
+13 -1
+13 -1
View File
@@ -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()