assert_cli::assert_cli! [] [src]

macro_rules! assert_cli {
    ($cmd:expr, $args:expr => Success, $output:expr) => { ... };
    ($cmd:expr, $args:expr => Error, $output:expr) => { ... };
    ($cmd:expr, $args:expr => Error $err:expr, $output:expr) => { ... };
}

The assert_cli! macro combines the functionality of the other functions in this crate in one short macro.

assert_cli!("echo 42" => Success, "42").unwrap();
assert_cli!("exit 11" => Error 11, "").unwrap();

Make sure to include the crate as #[macro_use] extern crate assert_cli;.