mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-04 09:53:04 +03:00
rustdoc: output stderr on doc-test fail
Forward output from stderr when a test executable panics/fails.
This commit is contained in:
@@ -243,8 +243,9 @@ fn drop(&mut self) {
|
||||
if should_panic && out.status.success() {
|
||||
panic!("test executable succeeded when it should have failed");
|
||||
} else if !should_panic && !out.status.success() {
|
||||
panic!("test executable failed:\n{:?}",
|
||||
str::from_utf8(&out.stdout));
|
||||
panic!("test executable failed:\n{}\n{}",
|
||||
str::from_utf8(&out.stdout).unwrap_or(""),
|
||||
str::from_utf8(&out.stderr).unwrap_or(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user