use std::env;
use std::ffi::OsStr;
-use std::fmt;
use std::fs;
use std::os;
use std::path::{Path, PathBuf};
self.ran = true;
let p = (&self.process_builder).clone().unwrap();
if let Err(e) = self.match_process(&p) {
- panic!("\nExpected: {:?}\n but: {}", self, e)
+ panic!("\n{}", e)
}
}
pub fn run_output(&mut self, output: &Output) {
self.ran = true;
if let Err(e) = self.match_output(output) {
- panic!("\nExpected: {:?}\n but: {}", self, e)
+ panic!("\n{}", e)
}
}
Ok(())
} else {
bail!(
- "differences:\n\
+ "{} did not match:\n\
{}\n\n\
other output:\n\
`{}`",
+ description,
diffs.join("\n"),
String::from_utf8_lossy(extra)
)
}
}
-impl fmt::Debug for Execs {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "execs")
- }
-}
-
pub fn execs() -> Execs {
Execs {
ran: false,