This is an minimalistic example:
it("actual length") {
import scala.io.AnsiColor
val str = AnsiColor.RED + "c" + AnsiColor.RESET
assert(str.length == 1)
}
But when this test is executed, it shows that the length of the str is 10, while the display length of it should be 1 (all ANSI escape characters should have 0 length)
How to correct it?