mirror of
https://github.com/imjasonh/dots
synced 2026-07-07 00:22:55 +00:00
test: unset NO_COLOR in TestMain for ANSI color tests
CI and cloud agent environments set NO_COLOR, which disabled color output and caused background/foreground ANSI tests to fail. Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
This commit is contained in:
parent
9625a18a1c
commit
c97576e31d
1 changed files with 6 additions and 0 deletions
|
|
@ -7,6 +7,12 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
// Cloud/CI environments often set NO_COLOR; color tests need ANSI output enabled.
|
||||
_ = os.Unsetenv("NO_COLOR")
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func TestANSIColorFunctions(t *testing.T) {
|
||||
for _, tt := range []struct {
|
||||
desc string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue