mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-28 16:18:57 +00:00
Add integration test for '--shell'
This commit is contained in:
1 parent
5c9c8c2383
commit
c0ce6b9537
1 file changed
+17
@@ -137,3 +137,20 @@ 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"),
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user