mirror of https://github.com/sirupsen/logrus.git
ignore expected color on windows
This commit is contained in:
parent
e9026580bf
commit
f1b98e4006
|
@ -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)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue