Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/assert-rs/assert_cmd
/ cargo_binary
Function
cargo_binary
tests/cargo.rs:8–12 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
6
7
#[test]
8
fn cargo_binary() {
9
let mut cmd = Command::cargo_bin(
"bin_fixture"
).unwrap();
10
cmd.env(
"stdout"
,
"42"
);
11
cmd.assert().success().stdout(
"42\n"
);
12
}
13
14
#[test]
15
fn cargo_binary_with_empty_env() {
Callers
nothing calls this directly
Calls
6
cargo_bin
Function · 0.85
env
Method · 0.80
stdout
Method · 0.80
success
Method · 0.80
unwrap
Method · 0.45
assert
Method · 0.45
Tested by
no test coverage detected