1
0
mirror of https://github.com/fatih/color.git synced 2025-02-10 18:31:11 +02:00

color_test: add global test too

This commit is contained in:
Fatih Arslan 2015-04-22 11:19:51 +03:00
parent 95e7214071
commit 2769863a2d

View File

@ -70,7 +70,18 @@ func TestNoColor(t *testing.T) {
p.Print(c.text)
line, _ := rb.ReadString('\n')
if line != c.text {
t.Errorf("Expecting %s, got '%s'\n", c.text, line)
}
}
// global check
NoColor = true
for _, c := range testColors {
p := New(c.code)
p.Print(c.text)
line, _ := rb.ReadString('\n')
if line != c.text {
t.Errorf("Expecting %s, got '%s'\n", c.text, line)
}