MCPcopy Index your code
hub / github.com/assert-rs/assert_cmd / lib_example

Function lib_example

tests/examples.rs:4–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3#[test]
4fn lib_example() {
5 let mut cmd = Command::cargo_bin("bin_fixture").unwrap();
6 cmd.assert().success();
7
8 let mut cmd = Command::cargo_bin("bin_fixture").unwrap();
9 let assert = cmd
10 .arg("-A")
11 .env("stdout", "hello")
12 .env("exit", "42")
13 .write_stdin("42")
14 .assert();
15 assert.failure().code(42).stdout("hello\n");
16}
17
18#[test]
19fn timeout_example() {

Callers

nothing calls this directly

Calls 10

cargo_binFunction · 0.85
successMethod · 0.80
write_stdinMethod · 0.80
envMethod · 0.80
argMethod · 0.80
stdoutMethod · 0.80
codeMethod · 0.80
failureMethod · 0.80
unwrapMethod · 0.45
assertMethod · 0.45

Tested by

no test coverage detected