-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Description
Issue :
go test fail if the output is colored.
Even if the tags are in the output (the comment line), it fails and seems to be litterally evaluated.
Exemple :
In myColored_test.go :
package main
import (
"fmt"
)func Example_ColorTerm() {
fmt.Print("\033[31mHello World\033[0m")
//Output: Hello World
}
Expectation :
Be able to pass the test either :
- as litteral "Hello World" (colors ignored)
- as interpreted string "\033[31mHello World\033[0m" (colors are also checked)
I personally prefere the second solution because it allows more accurate tests.
Environment :
- go version go1.12.9 linux/amd64
- Manjaro (Linux 4.19.69-1)
Reactions are currently unavailable