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:
parent
95e7214071
commit
2769863a2d
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user