ignore expected color on windows

This commit is contained in:
ceriath
2018-11-16 15:19:37 +01:00
committed by GitHub
parent e9026580bf
commit f1b98e4006
+6 -1
View File
@@ -5,6 +5,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"os" "os"
"runtime"
"sort" "sort"
"strings" "strings"
"testing" "testing"
@@ -443,7 +444,11 @@ func TestTextFormatterIsColored(t *testing.T) {
os.Setenv("CLICOLOR_FORCE", val.clicolorForceVal) os.Setenv("CLICOLOR_FORCE", val.clicolorForceVal)
} }
res := tf.isColored() res := tf.isColored()
assert.Equal(subT, val.expectedResult, res) if runtime.GOOS == "windows" {
assert.Equal(subT, false, res)
} else {
assert.Equal(subT, val.expectedResult, res)
}
}) })
} }
} }