diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-30 13:27:29 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-30 13:27:29 -0500 |
| commit | a6313954fc297ee4a6c1c42ba903730a364cd5df (patch) | |
| tree | f55cc085d966684253c6e7daaeee27593ca08801 /scripts/tests | |
| parent | 0234e52b727b34ade93961eb05b5638685f4406f (diff) | |
| download | rulesets-a6313954fc297ee4a6c1c42ba903730a364cd5df.tar.gz rulesets-a6313954fc297ee4a6c1c42ba903730a364cd5df.zip | |
test(scripts): cover drill-to-anki internals, broadcast, and daily-prep
I backfilled the gaps left after the flashcard work landed. drill-to-anki.py had tests only for its two default helpers. I added coverage for the core parser and its pieces: parse (section-to-tag mapping, drawer-only body, blank trimming, multiline join, no-card input), strip_org_metadata (drawer and planning-line stripping, unclosed drawer), section_to_tag, escape_html, and the deterministic stable_id. I also filled the remaining drill-deck-stats / drill-deck-diff-ids branches (missing-title and PROPERTIES-mismatch warnings, the appeared-IDs note path).
I added test_cross_project_broadcast.py for the two scripts that had none here: is_broadcastable / discover (SEARCH_ROOTS pointed at a tmp tree) / sender_project / inbox_send_path, plus an ERT suite for daily-prep-agenda.el (dp-iso-date, dp-bucket with the clock pinned, dp-format-entry, and dp-collect end to end on a temp org file).
daily-prep-agenda.el needed one change to be loadable under ERT: its batch entrypoint fired on any load. I gated it behind dp--cli-invocation-p, the same readable-files check lint-org.el already uses, so requiring the file for tests no longer runs the extractor. A real invocation with a file argument still fires. A no-argument run now no-ops instead of printing an empty header.
Diffstat (limited to 'scripts/tests')
0 files changed, 0 insertions, 0 deletions
