mirror of https://github.com/stelzo/typst.git
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();
|
stdout.write_all(name.to_string_lossy().as_bytes()).unwrap();
|
||||||
if ok {
|
if ok {
|
||||||
writeln!(stdout, " ✔").unwrap();
|
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.
|
// ANSI escape codes: cursor moves up and clears the line.
|
||||||
write!(stdout, "\x1b[1A\x1b[2K").unwrap();
|
write!(stdout, "\x1b[1A\x1b[2K").unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue