Set foreground color without affecting background

Close #712
This commit is contained in:
Junegunn Choi
2016-10-21 19:35:59 +09:00
parent cfdb00b971
commit 0a8d2996dc
6 changed files with 73 additions and 76 deletions

View File

@@ -299,20 +299,14 @@ func TestColorSpec(t *testing.T) {
}
customized.Fg = curses.Dark256.Fg
customized.Bg = curses.Dark256.Bg
if *curses.Dark256 == *customized {
t.Errorf("colors should now be equivalent")
if *curses.Dark256 != *customized {
t.Errorf("colors should now be equivalent: %v, %v", curses.Dark256, customized)
}
customized = parseTheme(theme, "fg:231,dark,bg:232")
if customized.Fg != curses.Dark256.Fg || customized.Bg == curses.Dark256.Bg {
t.Errorf("color not customized")
}
if customized.UseDefault {
t.Errorf("not using default colors")
}
if !curses.Dark256.UseDefault {
t.Errorf("using default colors")
}
}
func TestParseNilTheme(t *testing.T) {