Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Jan 30, 2020
1 parent 891e9ec commit b358f6b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions termenv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ func TestTermEnv(t *testing.T) {
}

fg := ForegroundColor()
fgseq := fg.Sequence(false)
fgexp := "97"
if fg.Sequence(false) != fgexp && fg.Sequence(false) != "" {
t.Errorf("Expected %s, got %s", fgexp, fg.Sequence(false))
if fgseq != fgexp && fgseq != "" {
t.Errorf("Expected %s, got %s", fgexp, fgseq)
}

bg := BackgroundColor()
bgseq := bg.Sequence(true)
bgexp := "48;2;0;0;0"
if bg.Sequence(true) != bgexp && bg.Sequence(true) != "" {
t.Errorf("Expected %s, got %s", bgexp, bg.Sequence(true))
if bgseq != bgexp && bgseq != "" {
t.Errorf("Expected %s, got %s", bgexp, bgseq)
}

_ = HasDarkBackground()
Expand Down

0 comments on commit b358f6b

Please sign in to comment.