14 releases (9 breaking)

✓ Uses Rust 2018 edition

0.12.0 Dec 5, 2019
0.11.1 Mar 23, 2019
0.11.0 Jan 29, 2019
0.10.2 Nov 21, 2018
0.6.0 Jul 19, 2018

#6 in Testing

Download history 2728/week @ 2019-10-07 2420/week @ 2019-10-14 3612/week @ 2019-10-21 3454/week @ 2019-10-28 4456/week @ 2019-11-04 3580/week @ 2019-11-11 4128/week @ 2019-11-18 4669/week @ 2019-11-25 7178/week @ 2019-12-02 4718/week @ 2019-12-09 5160/week @ 2019-12-16 2879/week @ 2019-12-23 3395/week @ 2019-12-30 5200/week @ 2020-01-06 6444/week @ 2020-01-13

17,032 downloads per month
Used in 112 crates

MIT/Apache

65KB
975 lines

assert_cmd

Assert process::Command - Easy command initialization and assertions.

Build Status Documentation License Crates Status

Install

Add to your Cargo.toml:

[dependencies]
assert_cmd = "0.11"

Example

Here's a trivial example:

use assert_cmd::Command;

let mut cmd = Command::cargo_bin("bin_fixture").unwrap();
cmd.assert().success();

Relevant crates

Other crates that might be useful in testing command line programs.

  • duct for orchestrating multiple processes.
  • rexpect for testing interactive programs.
  • assert_fs for filesystem fixtures and assertions.
  • dir-diff for testing file side-effects.
  • tempfile for scratchpad directories.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.4–2MB
~40K SLoC