aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gallery-tokens/test_gen_tokens.py12
-rw-r--r--tests/gallery-widgets/test-gallery-widget.el2
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/gallery-tokens/test_gen_tokens.py b/tests/gallery-tokens/test_gen_tokens.py
index 414194e..b9fbb50 100644
--- a/tests/gallery-tokens/test_gen_tokens.py
+++ b/tests/gallery-tokens/test_gen_tokens.py
@@ -210,6 +210,16 @@ class RealTokensJson(unittest.TestCase):
self.assertIn("pulse-rate", self.tokens["timing"])
+class DefaultElispFilename(unittest.TestCase):
+ """The default elisp target must be gallery-tokens.el so that the file's
+ (provide 'gallery-tokens) matches its name and `require` can resolve it
+ from a load-path. A tokens.el/gallery-tokens feature mismatch is a trap."""
+
+ def test_default_elisp_path_matches_provided_feature(self):
+ self.assertEqual(
+ os.path.basename(gt.DEFAULT_ELISP_NAME), "gallery-tokens.el")
+
+
class MainIntegration(unittest.TestCase):
"""main() rewrites the html :root and writes the waybar + elisp files."""
@@ -218,7 +228,7 @@ class MainIntegration(unittest.TestCase):
self.html = os.path.join(self.tmp, "gallery.html")
self.tokens_path = os.path.join(self.tmp, "tokens.json")
self.waybar = os.path.join(self.tmp, "tokens-waybar.css")
- self.elisp = os.path.join(self.tmp, "tokens.el")
+ self.elisp = os.path.join(self.tmp, "gallery-tokens.el")
with open(self.tokens_path, "w") as f:
json.dump(FIXTURE, f)
with open(self.html, "w") as f:
diff --git a/tests/gallery-widgets/test-gallery-widget.el b/tests/gallery-widgets/test-gallery-widget.el
index ec484bb..166cd59 100644
--- a/tests/gallery-widgets/test-gallery-widget.el
+++ b/tests/gallery-widgets/test-gallery-widget.el
@@ -2,7 +2,7 @@
;;; Commentary:
;; Tests for the svg.el proof-of-concept renderer in docs/prototypes/.
-;; gallery-widget.el reads the generated tokens.el (same source of truth as
+;; gallery-widget.el reads the generated gallery-tokens.el (same source of truth as
;; the web gallery and the waybar CSS) and renders gallery widgets as SVG.
;; These tests exercise the REAL module (loaded by path, not a copy):
;; token resolution, needle-angle math (normal/boundary/error), and the