mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-03 01:21:25 +00:00
Add simple integation test for --shell=none
This commit is contained in:
1 parent
e38ac46179
commit
e666b01e09
1 file changed
+13
-1
@@ -10,7 +10,7 @@ pub fn hyperfine_debug() -> assert_cmd::Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn hyperfine_runs_successfully() {
|
fn runs_successfully() {
|
||||||
hyperfine()
|
hyperfine()
|
||||||
.arg("--runs=2")
|
.arg("--runs=2")
|
||||||
.arg("echo dummy benchmark")
|
.arg("echo dummy benchmark")
|
||||||
@@ -27,6 +27,18 @@ fn one_run_is_supported() {
|
|||||||
.success();
|
.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]
|
#[test]
|
||||||
fn fails_with_wrong_number_of_command_name_arguments() {
|
fn fails_with_wrong_number_of_command_name_arguments() {
|
||||||
hyperfine()
|
hyperfine()
|
||||||
|
|||||||
Reference in new issue
Block a user