Skip to content
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
@azriel91

Description

@azriel91

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions