diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-28 23:17:32 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-28 23:17:32 -0400 |
| commit | 01ffb104209f032967cdbaed19cc221854b6dba3 (patch) | |
| tree | 604c3c160dfbd2b32c5f3caad35b358cad6324a1 /tests/test-music-config--faces.el | |
| parent | c5f27c81f93f8d4eccfb488a92fb3eeb9b515c34 (diff) | |
| download | dotemacs-01ffb104209f032967cdbaed19cc221854b6dba3.tar.gz dotemacs-01ffb104209f032967cdbaed19cc221854b6dba3.zip | |
fix(music): define the playlist-header faces
The route-colors pass dropped the literal cj/music-* face definitions but left the playlist header referencing them, so every header render spammed "Invalid face reference". I restored the five as deffaces that inherit themed base faces, so the theme still owns their colors. A test asserts each referenced face is defined.
Diffstat (limited to 'tests/test-music-config--faces.el')
| -rw-r--r-- | tests/test-music-config--faces.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test-music-config--faces.el b/tests/test-music-config--faces.el new file mode 100644 index 000000000..c45049e1a --- /dev/null +++ b/tests/test-music-config--faces.el @@ -0,0 +1,25 @@ +;;; test-music-config--faces.el --- music playlist face definitions -*- lexical-binding: t; -*- + +;;; Commentary: +;; The playlist header propertizes text with cj/music-* faces. Each must be a +;; defined face (defface) or the reference is invalid -- an undefined face spams +;; "Invalid face reference" on every header render. The faces inherit from +;; themed base faces so the theme still owns their colors. + +;;; Code: + +(require 'ert) +(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory)) +(require 'music-config) + +(ert-deftest test-music-config-header-faces-are-defined () + "Normal: every cj/music face the playlist header uses is a defined face." + (dolist (f '(cj/music-header-face + cj/music-header-value-face + cj/music-mode-on-face + cj/music-mode-off-face + cj/music-keyhint-face)) + (should (facep f)))) + +(provide 'test-music-config--faces) +;;; test-music-config--faces.el ends here |
