feat(themes): add Solarized Dark/Light, Gruvbox Dark, Moss TOML themes
This commit is contained in:
@@ -71,3 +71,32 @@ def test_get_syntax_palette_for_unknown_theme_returns_default(tmp_path, monkeypa
|
||||
monkeypatch.setattr(theme, "get_global_themes_path", lambda: themes_dir)
|
||||
theme.load_themes_from_disk()
|
||||
assert theme.get_syntax_palette_for_theme("NonExistent") == "dark"
|
||||
|
||||
|
||||
def test_all_four_new_themes_registered(tmp_path, monkeypatch):
|
||||
from src import paths as paths_mod
|
||||
|
||||
themes_dir = tmp_path / "themes"
|
||||
themes_dir.mkdir()
|
||||
for name in ["solarized_dark", "solarized_light", "gruvbox_dark", "moss"]:
|
||||
(themes_dir / f"{name}.toml").write_text(
|
||||
'syntax_palette = "dark"\n[colors]\nwindow_bg = [0, 0, 0]\n'
|
||||
)
|
||||
monkeypatch.setattr(theme, "get_global_themes_path", lambda: themes_dir)
|
||||
theme.load_themes_from_disk()
|
||||
names = theme.get_palette_names()
|
||||
for name in ["solarized_dark", "solarized_light", "gruvbox_dark", "moss"]:
|
||||
assert name in names, f"missing theme: {name}"
|
||||
|
||||
|
||||
def test_solarized_light_uses_light_syntax_palette(tmp_path, monkeypatch):
|
||||
from src import paths as paths_mod
|
||||
|
||||
themes_dir = tmp_path / "themes"
|
||||
themes_dir.mkdir()
|
||||
(themes_dir / "solarized_light.toml").write_text(
|
||||
'syntax_palette = "light"\n[colors]\nwindow_bg = [253, 246, 227]\n'
|
||||
)
|
||||
monkeypatch.setattr(theme, "get_global_themes_path", lambda: themes_dir)
|
||||
theme.load_themes_from_disk()
|
||||
assert theme.get_syntax_palette_for_theme("solarized_light") == "light"
|
||||
|
||||
Reference in New Issue
Block a user