Add integration test for '--shell'

This commit is contained in:
David Peter authored and David Peter committed 2022-02-22 09:07:40 +01:00
1 parent 5c9c8c2383
commit c0ce6b9537
1 file changed
+17
+17
View File
@@ -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"),
),
);
}