Explicitly mark the end of a failed test's captured output
This commit is contained in:
parent
269d5b56bc
commit
21de27c88a
1 changed files with 7 additions and 1 deletions
|
|
@ -250,8 +250,14 @@ impl<'a> Renderer<'a> {
|
|||
if failure.stdout.is_some() || failure.message.is_some() {
|
||||
println!("---- {} stdout ----", failure.name);
|
||||
if let Some(stdout) = &failure.stdout {
|
||||
println!("{stdout}");
|
||||
// Captured test output normally ends with a newline,
|
||||
// so only use `println!` if it doesn't.
|
||||
print!("{stdout}");
|
||||
if !stdout.ends_with('\n') {
|
||||
println!("\n\\ (no newline at end of output)");
|
||||
}
|
||||
}
|
||||
println!("---- {} stdout end ----", failure.name);
|
||||
if let Some(message) = &failure.message {
|
||||
println!("NOTE: {message}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue