You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have personally used and would recommend jansi for any kind of escape sequence handling.
It has a nice API and automatically “strips ANSI escape codes if process output is being redirected and not attached to a terminal”.
Note: the application-wide AnsiConsole.systemInstall(); is not necessary. I usually use jansi through their AnsiConsole.out, and thus do not affect anything else.
Edit: I just realized that we are reporting errors through exceptions, not by directly printing them. That means, of course, that we cannot use jansi’s magic directly (we could use AnsiConsole.systemInstall();, though, but I do not like that).
However, we should definitely have logic that can handle the case that we are connected to a sink that does not support ANSI escape codes.
https://stackoverflow.com/questions/5762491/how-to-print-color-in-console-using-system-out-println
I am open for suggestions, the only thing I am opinionated is to use green for checkmarks and red for crosses in summary assertions.
The text was updated successfully, but these errors were encountered: