diff options
| author | adamdottv <[email protected]> | 2025-05-12 10:45:03 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-05-12 10:45:03 -0500 |
| commit | 8cbfc581b5243aece96d32fc97c72ada5df3ae54 (patch) | |
| tree | f7a6c45d6ea3f767526e37f0104f020da9481ffe /internal/tui/theme/theme_test.go | |
| parent | 4bb350a09ba5c88a830f4ab07fcc99b4febda0dc (diff) | |
| download | opencode-8cbfc581b5243aece96d32fc97c72ada5df3ae54.tar.gz opencode-8cbfc581b5243aece96d32fc97c72ada5df3ae54.zip | |
chore: cleanup
Diffstat (limited to 'internal/tui/theme/theme_test.go')
| -rw-r--r-- | internal/tui/theme/theme_test.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/internal/tui/theme/theme_test.go b/internal/tui/theme/theme_test.go index 5ec810e33..790ee3aa8 100644 --- a/internal/tui/theme/theme_test.go +++ b/internal/tui/theme/theme_test.go @@ -7,7 +7,7 @@ import ( func TestThemeRegistration(t *testing.T) { // Get list of available themes availableThemes := AvailableThemes() - + // Check if "catppuccin" theme is registered catppuccinFound := false for _, themeName := range availableThemes { @@ -16,11 +16,11 @@ func TestThemeRegistration(t *testing.T) { break } } - + if !catppuccinFound { t.Errorf("Catppuccin theme is not registered") } - + // Check if "gruvbox" theme is registered gruvboxFound := false for _, themeName := range availableThemes { @@ -29,11 +29,11 @@ func TestThemeRegistration(t *testing.T) { break } } - + if !gruvboxFound { t.Errorf("Gruvbox theme is not registered") } - + // Check if "monokai" theme is registered monokaiFound := false for _, themeName := range availableThemes { @@ -42,48 +42,48 @@ func TestThemeRegistration(t *testing.T) { break } } - + if !monokaiFound { t.Errorf("Monokai theme is not registered") } - + // Try to get the themes and make sure they're not nil catppuccin := GetTheme("catppuccin") if catppuccin == nil { t.Errorf("Catppuccin theme is nil") } - + gruvbox := GetTheme("gruvbox") if gruvbox == nil { t.Errorf("Gruvbox theme is nil") } - + monokai := GetTheme("monokai") if monokai == nil { t.Errorf("Monokai theme is nil") } - + // Test switching theme originalTheme := CurrentThemeName() - + err := SetTheme("gruvbox") if err != nil { t.Errorf("Failed to set theme to gruvbox: %v", err) } - + if CurrentThemeName() != "gruvbox" { t.Errorf("Theme not properly switched to gruvbox") } - + err = SetTheme("monokai") if err != nil { t.Errorf("Failed to set theme to monokai: %v", err) } - + if CurrentThemeName() != "monokai" { t.Errorf("Theme not properly switched to monokai") } - + // Switch back to original theme _ = SetTheme(originalTheme) -}
\ No newline at end of file +} |
