Skip to content

Commit

Permalink
Add integration test for '--shell'
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Feb 21, 2022
1 parent e4da76e commit 5096c3b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,19 @@ fn can_run_failing_commands_with_ignore_failure_option() {
.assert()
.success();
}

#[test]
fn runs_commands_using_user_defined_shell() {
hyperfine()
.arg("--runs=1")
.arg("--show-output")
.arg("--shell")
.arg("echo 'custom_shell' '--shell-arg'")
.arg("echo benchmark")
.assert()
.success()
.stdout(
predicate::str::contains("custom_shell --shell-arg -c echo benchmark")
.or(predicate::str::contains("custom_shell --shell-arg /C echo benchmark")),
);
}

0 comments on commit 5096c3b

Please sign in to comment.