just/tests/assert_success.rs

8 lines
273 B
Rust
Raw Permalink Normal View History

pub(crate) fn assert_success(output: &std::process::Output) {
2021-07-03 14:26:59 -07:00
if !output.status.success() {
eprintln!("stderr: {}", String::from_utf8_lossy(&output.stderr));
eprintln!("stdout: {}", String::from_utf8_lossy(&output.stdout));
panic!("{}", output.status);
}
}