[−][src]Macro assert_cmd::crate_name
Allows you to pull the name from your Cargo.toml at compile time.
Examples
#[macro_use] extern crate assert_cmd; use std::process::Command; use assert_cmd::prelude::*; fn main() { let mut cmd = Command::cargo_bin(crate_name!()).unwrap(); cmd .arg("-A") .env("stdout", "hello") .env("exit", "42") .with_stdin() .buffer("42"); let assert = cmd.assert(); assert .failure() .code(42) .stdout("hello\n"); }