Macro snapbox_macros::cargo_bin

source ·
macro_rules! cargo_bin {
    ($bin_target_name:expr) => { ... };
}
Expand description

The absolute path to a binary target’s executable.

The bin_target_name is the name of the binary target, exactly as-is.

NOTE: This is only set when building an integration test or benchmark.

§Example

#[test]
fn cli_tests() {
    trycmd::TestCases::new()
        .default_bin_path(trycmd::cargo_bin!("bin-fixture"))
        .case("tests/cmd/*.trycmd");
}