mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 16:18:57 +00:00
Add new integration test
This commit is contained in:
1 parent
c751a7735c
commit
4fa0aba266
1 file changed
+13
@@ -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"));
|
||||
}
|
||||
Reference in new issue
Block a user