Skip to content

Commit 069482b

Browse files
committed
docs: Use a local example for cargo_bin!
1 parent 375e147 commit 069482b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/macros.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ macro_rules! crate_name {
4242
///
4343
/// ## Example
4444
///
45-
/// ```rust,no_run
46-
/// #[test]
47-
/// fn cli_tests() {
48-
/// trycmd::TestCases::new()
49-
/// .default_bin_path(trycmd::cargo_bin!())
50-
/// .case("tests/cmd/*.trycmd");
51-
/// }
45+
/// ```rust,ignore
46+
/// use assert_cmd::prelude::*;
47+
/// use assert_cmd::cargo::cargo_bin;
48+
///
49+
/// use std::process::Command;
50+
///
51+
/// let mut cmd = Command::new(cargo_bin!())
52+
/// .unwrap();
53+
/// let output = cmd.unwrap();
5254
/// ```
5355
#[macro_export]
5456
#[doc(hidden)]

0 commit comments

Comments
 (0)