mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 08:08:58 +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]
|
||||
fn hyperfine_runs_successfully() {
|
||||
fn runs_successfully() {
|
||||
hyperfine()
|
||||
.arg("--runs=2")
|
||||
.arg("echo dummy benchmark")
|
||||
@@ -27,6 +27,18 @@ fn one_run_is_supported() {
|
||||
.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]
|
||||
fn fails_with_wrong_number_of_command_name_arguments() {
|
||||
hyperfine()
|
||||
|
||||
Reference in new issue
Block a user