()
| 2 | |
| 3 | #[test] |
| 4 | fn 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] |
| 19 | fn timeout_example() { |