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

Fix color leakage #10

Merged
merged 6 commits into from
Jun 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into bug/color-leakage
  • Loading branch information
subtlepseudonym committed Apr 23, 2020
commit f3dda9708d81db9c84d7ef971f0c57177f68f601
26 changes: 0 additions & 26 deletions Gopkg.toml

This file was deleted.

3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/rakyll/gotest

go 1.14
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

var (
success = color.FgGreen
skipped = color.FgYellow
fail = color.FgHiRed
)

Expand Down Expand Up @@ -87,6 +88,10 @@ func parse(line string) {
case strings.HasPrefix(trimmed, "PASS"):
color.Set(success)

// skipped
case strings.HasPrefix(trimmed, "--- SKIP"):
color.Set(skipped)

// failure
case strings.HasPrefix(trimmed, "--- FAIL"):
fallthrough
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.