1
1
mirror of https://github.com/casey/just.git synced 2024-11-22 18:34:06 +03:00
just/tests/assert_success.rs
2024-11-01 00:54:46 +00:00

9 lines
289 B
Rust

#[track_caller]
pub(crate) fn assert_success(output: &std::process::Output) {
if !output.status.success() {
eprintln!("stderr: {}", String::from_utf8_lossy(&output.stderr));
eprintln!("stdout: {}", String::from_utf8_lossy(&output.stdout));
panic!("{}", output.status);
}
}