Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/assert-rs/assert_cmd
/ cargo_binary_with_empty_env
Function
cargo_binary_with_empty_env
tests/cargo.rs:15–19 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
13
14
#[test]
15
fn cargo_binary_with_empty_env() {
16
let mut cmd = Command::cargo_bin(
"bin_fixture"
).unwrap();
17
cmd.env_clear().env(
"stdout"
,
"42"
);
18
cmd.assert().success().stdout(
"42\n"
);
19
}
20
21
#[test]
22
fn mod_example() {
Callers
nothing calls this directly
Calls
7
cargo_bin
Function · 0.85
env
Method · 0.80
env_clear
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