diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index a58d331..1ff1c3a 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1,6 +1,8 @@ mod common; use common::hyperfine; +use predicates::prelude::*; + #[test] fn hyperfine_runs_successfully() { hyperfine() @@ -18,3 +20,14 @@ fn one_run_is_supported() { .assert() .success(); } + +#[test] +fn fails_with_wrong_number_of_command_name_arguments() { + hyperfine() + .arg("--command-name=a") + .arg("--command-name=b") + .arg("echo a") + .assert() + .failure() + .stderr(predicate::str::contains("Too many --command-name options")); +}