1
0
Fork 0
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:
Cursor Agent 2026-05-21 17:00:48 +00:00
parent 9625a18a1c
commit c97576e31d
No known key found for this signature in database

View file

@ -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