We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cargo_bin!
1 parent b883443 commit 17d7c83Copy full SHA for 17d7c83
src/macros.rs
@@ -37,13 +37,16 @@ macro_rules! crate_name {
37
/// #[test]
38
/// fn cli_tests() {
39
/// trycmd::TestCases::new()
40
-/// .default_bin_path(trycmd::cargo_bin!("bin-fixture"))
+/// .default_bin_path(trycmd::cargo_bin!())
41
/// .case("tests/cmd/*.trycmd");
42
/// }
43
/// ```
44
#[macro_export]
45
#[doc(hidden)]
46
macro_rules! cargo_bin {
47
+ () => {
48
+ $crate::cargo::cargo_bin!($crate::crate_name!())
49
+ };
50
($bin_target_name:expr) => {
51
::std::path::Path::new(env!(concat!("CARGO_BIN_EXE_", $bin_target_name)))
52
};
0 commit comments