TestError::display is hard to use
xxchan opened this issue · 3 comments
xxchan commented
Because users generally will return Result
in tests, and there's no chance to call display(true)
to get colorful error message. If it's printed, it will be duplicate with the Err
.
Maybe we can refer to https://docs.rs/pretty_assertions/latest/pretty_assertions/ about how can we opt-in colorful message in library usage.
xxchan commented
pretty-assertions also suffer from this rust-pretty-assertions/rust-pretty-assertions#31
xxchan commented
can we detect ANSI-colour support automatically?
In general, no.
xxchan commented
sqllogictest-rs/sqllogictest-bin/src/main.rs
Lines 504 to 512 in 58673cb
I think this is actually acceptable 🤣