Function assert_cmd::cargo::main_binary_path [−][src]
pub fn main_binary_path() -> Result<PathBuf, CargoError>
Deprecated since 0.9.1
: For caching, using escargot directly.
Get the path to the crate's main binary.
Intended for caching the location, reducing the cargo overhead.
Note: only works if there one bin in the crate.
Examples
use assert_cmd::prelude::*; use std::process::Command; let bin_under_test = assert_cmd::cargo::main_binary_path().unwrap(); Command::new(&bin_under_test) .unwrap();