mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Show which reference image was updated (#3008)
This commit is contained in:
parent
6808e58a3b
commit
c361566cb2
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user