diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-10-01 00:00:54 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-10-09 00:17:00 +0900 |
| commit | e6ad01fb90df7e324068f61ae96e056f327959c7 (patch) | |
| tree | 6c909ebfc490bf216f12449b9b3062ee963e7085 /src/options_test.go | |
| parent | ce2200e9080d84a0e658fd1523f4fac619b58da4 (diff) | |
| download | fzf-e6ad01fb90df7e324068f61ae96e056f327959c7.tar.gz | |
Revise color configuration
Diffstat (limited to 'src/options_test.go')
| -rw-r--r-- | src/options_test.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/options_test.go b/src/options_test.go index 7b152d75..1494d960 100644 --- a/src/options_test.go +++ b/src/options_test.go @@ -300,8 +300,12 @@ func TestBind(t *testing.T) { } func TestColorSpec(t *testing.T) { + var base *tui.ColorTheme theme := tui.Dark256 - dark, _ := parseTheme(theme, "dark") + base, dark, _ := parseTheme(theme, "dark") + if *dark != *base { + t.Errorf("incorrect base theme returned") + } if *dark != *theme { t.Errorf("colors should be equivalent") } @@ -309,7 +313,10 @@ func TestColorSpec(t *testing.T) { t.Errorf("point should not be equivalent") } - light, _ := parseTheme(theme, "dark,light") + base, light, _ := parseTheme(theme, "dark,light") + if *light != *base { + t.Errorf("incorrect base theme returned") + } if *light == *theme { t.Errorf("should not be equivalent") } @@ -320,7 +327,7 @@ func TestColorSpec(t *testing.T) { t.Errorf("point should not be equivalent") } - customized, _ := parseTheme(theme, "fg:231,bg:232") + _, customized, _ := parseTheme(theme, "fg:231,bg:232") if customized.Fg.Color != 231 || customized.Bg.Color != 232 { t.Errorf("color not customized") } @@ -333,7 +340,7 @@ func TestColorSpec(t *testing.T) { t.Errorf("colors should now be equivalent: %v, %v", tui.Dark256, customized) } - customized, _ = parseTheme(theme, "fg:231,dark bg:232") + _, customized, _ = parseTheme(theme, "fg:231,dark bg:232") if customized.Fg != tui.Dark256.Fg || customized.Bg == tui.Dark256.Bg { t.Errorf("color not customized") } |
