1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/// Allows you to pull the name from your Cargo.toml at compile time.
///
/// # Examples
///
/// ```should_panic
/// use assert_cmd::Command;
///
/// let mut cmd = Command::cargo_bin(assert_cmd::pkg_name!()).unwrap();
/// let assert = cmd
/// .arg("-A")
/// .env("stdout", "hello")
/// .env("exit", "42")
/// .write_stdin("42")
/// .assert();
/// assert
/// .failure()
/// .code(42)
/// .stdout("hello\n");
/// ```
/// Deprecated, replaced with [`pkg_name`]
/// 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
///
/// ```rust,ignore
/// use assert_cmd::prelude::*;
/// use assert_cmd::cargo::cargo_bin;
///
/// use std::process::Command;
///
/// let mut cmd = Command::new(cargo_bin!())
/// let output = cmd.unwrap();
/// ```
/// 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
///
/// ```rust,ignore
/// use assert_cmd::prelude::*;
/// use assert_cmd::cargo::cargo_bin_cmd;
///
/// use std::process::Command;
///
/// let mut cmd = cargo_bin_cmd!()
/// let output = cmd.unwrap();
/// ```