Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset test name color before newline #147

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

siadat
Copy link
Contributor

@siadat siadat commented Jun 6, 2021

I'm capturing the output of "go test" (and hence go-testdeep) and prepending a string to the output. The yellow color of the test-name line leaks to the prefix of the next line.

Before this PR (see the third line):

⚫️ [prefix with default color] --- FAIL: TestParse (0.00s)
⚫️ [prefix with default color]    some_test.go:16: Failed test
🟡 [prefix with YELLOW color]          DATA: should NOT be an error
⚫️ [prefix with default color]                      got: (*errors.errorString)(0xc00010a780)(not implemented)
⚫️ [prefix with default color]                 expected: nil
...

After this PR:

⚫️ [prefix with default color] --- FAIL: TestParse (0.00s)
⚫️ [prefix with default color]      some_test.go:16: Failed test
⚫️ [prefix with default color]         DATA: should NOT be an error
⚫️ [prefix with default color]                      got: (*errors.errorString)(0xc00010a780)(not implemented)
⚫️ [prefix with default color]                 expected: nil
...

I quite like the colors of go-testdeep (fantastic readability is one of the reason I use it), so I want to keep the colors in this case.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 911530142

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+2.0e**-05%**) to 99.837%

Totals Coverage Status
Change from base Build 843296436: 2.0e-05%
Covered Lines: 8562
Relevant Lines: 8576

💛 - Coveralls

@maxatome maxatome merged commit 51698d5 into maxatome:master Jun 7, 2021
@maxatome
Copy link
Owner

maxatome commented Jun 7, 2021

Thanks!

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.

None yet

3 participants