This repository was archived by the owner on Dec 29, 2021. It is now read-only.
This repository was archived by the owner on Dec 29, 2021. It is now read-only.
Prefix assertion command with user specified command #114
Closed
Description
Hiya! I'm wondering if it's a good idea to allow users to prefix an assertion command with their own command. The use case is being able to run a cargo binary / example under kcov or some other wrapper tool.
What it could look like:
#[test]
fn menu_example() {
let kcov_command = &[
"kcov",
&format!("--include-pattern={}/src", env!("CARGO_MANIFEST_DIR")),
&format!("{}/coverage", env!("CARGO_TARGET_DIR"))
];
assert_cli::Assert::example("01_menu")
.with_prefix(kcov_command)
.stdin("exit\n")
.unwrap();
}
Metadata
Metadata
Assignees
Labels
No labels