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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"os"
"runtime"
"sort"
"strings"
"testing"
@ -443,7 +444,11 @@ func TestTextFormatterIsColored(t *testing.T) {
os.Setenv("CLICOLOR_FORCE", val.clicolorForceVal)
}
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)
}
})
}
}