From c361566cb2d992596544d1277bcd8d93c14c9f90 Mon Sep 17 00:00:00 2001 From: PgBiel <9021226+PgBiel@users.noreply.github.com> Date: Tue, 19 Dec 2023 06:19:20 -0300 Subject: [PATCH] Show which reference image was updated (#3008) --- tests/src/tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 5e6b7b401..03696eab6 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -498,7 +498,9 @@ fn test( stdout.write_all(name.to_string_lossy().as_bytes()).unwrap(); if ok { writeln!(stdout, " ✔").unwrap(); - if stdout.is_terminal() { + // Don't clear the line when the reference image was updated, to + // show in the output which test had its image updated. + if !updated && stdout.is_terminal() { // ANSI escape codes: cursor moves up and clears the line. write!(stdout, "\x1b[1A\x1b[2K").unwrap(); }