Add new integration test

This commit is contained in:
David Peter authored and David Peter committed 2022-02-06 20:19:50 +01:00
1 parent c751a7735c
commit 4fa0aba266
1 file changed
+13
+13
View File
@@ -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"));
}