diff options
| author | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2023-12-19 06:19:20 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-19 10:19:20 +0100 |
| commit | c361566cb2d992596544d1277bcd8d93c14c9f90 (patch) | |
| tree | 0094b63a4761bef0a2be13c4b0c7f4f73c75ce83 | |
| parent | 6808e58a3bb2782c49517c02634b65d85fe28664 (diff) | |
Show which reference image was updated (#3008)
| -rw-r--r-- | tests/src/tests.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/tests.rs b/tests/src/tests.rs index 5e6b7b40..03696eab 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(); } |
