diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-08 22:08:47 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-08 22:08:47 -0500 |
| commit | 634bebcd5e8e7ade1a54f1d2aa1596487bf472ad (patch) | |
| tree | 06e0625e19788cc88eca22c0a5d9390effb5c2ab /tests/test-cj-window-toggle-lib.el | |
| parent | 78269dae7dd445425e5ec0863b65ca768a4f76a3 (diff) | |
| download | dotemacs-634bebcd5e8e7ade1a54f1d2aa1596487bf472ad.tar.gz dotemacs-634bebcd5e8e7ade1a54f1d2aa1596487bf472ad.zip | |
test(theme-studio): make generate.py importable and test the templating
The page generator's risky logic, the export-strip that inlines colormath.js and the placeholder substitution that fills in the sample and palette data, had no tests. A bug there ships a broken theme-studio.html the JS tests can't see, since they import colormath.js directly and never look at the assembled page.
I pulled the strip into a strip_exports function and guarded the file write behind __main__, so importing generate.py builds the page in memory without writing it. test_generate.py asserts the strip removes export lines, preserves the body, and rstrips. It asserts the assembled page has every placeholder filled and carries the colormath body verbatim. And it guards that colormath.js keeps its export on a single line, since the line-based strip would leave a multi-line export's continuation behind. That was the exact failure that bit during the first integration.
Diffstat (limited to 'tests/test-cj-window-toggle-lib.el')
0 files changed, 0 insertions, 0 deletions
