13 releases (8 breaking)

0.11.1 Mar 23, 2019
0.10.2 Nov 21, 2018
0.6.0 Jul 19, 2018

#8 in Testing

Download history 771/week @ 2019-01-20 1009/week @ 2019-01-27 1071/week @ 2019-02-03 738/week @ 2019-02-10 512/week @ 2019-02-17 698/week @ 2019-02-24 701/week @ 2019-03-03 570/week @ 2019-03-10 857/week @ 2019-03-17 1411/week @ 2019-03-24 1177/week @ 2019-03-31 1632/week @ 2019-04-07 1214/week @ 2019-04-14 1151/week @ 2019-04-21 1098/week @ 2019-04-28

5,681 downloads per month
Used in 59 crates

MIT/Apache

58KB
894 lines

assert_cmd

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

Travis Status Appveyor Status Documentation License Crates Status

Install

Add to your Cargo.toml:

[dependencies]
assert_cmd = "0.11"

Example

Here's a trivial example:

extern crate assert_cmd;

use std::process::Command;
use assert_cmd::prelude::*;

Command::cargo_bin("bin_fixture")
    .unwrap()
    .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

~2MB
~37K SLoC