mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 17:11:28 +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;
|
mod common;
|
||||||
use common::hyperfine;
|
use common::hyperfine;
|
||||||
|
|
||||||
|
use predicates::prelude::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn hyperfine_runs_successfully() {
|
fn hyperfine_runs_successfully() {
|
||||||
hyperfine()
|
hyperfine()
|
||||||
@@ -18,3 +20,14 @@ fn one_run_is_supported() {
|
|||||||
.assert()
|
.assert()
|
||||||
.success();
|
.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