Skip to content

tests: isolate console color expectations - #781

Merged
rs merged 1 commit into
rs:masterfrom
HNO3Miracle:hno3/isolate-console-color-test
Jul 22, 2026
Merged

tests: isolate console color expectations#781
rs merged 1 commit into
rs:masterfrom
HNO3Miracle:hno3/isolate-console-color-test

Conversation

@HNO3Miracle

Copy link
Copy Markdown
Contributor

Clear NO_COLOR for TestConsoleLogger so its ANSI-color expectations do not depend on the caller or CI environment. t.Setenv restores the original value after the test.

Testing:

  • go test .
  • go vet .

TestConsoleWriter verifies both colored output and the NO_COLOR behavior, but inherited NO_COLOR from the build environment. Start the test with a known empty value so its color assertions are deterministic.

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
@rs
rs merged commit 1170ccf into rs:master Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants