aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-small-branch-coverage.el
Commit message (Collapse)AuthorAgeFilesLines
* fix: scope cloze fontification to drill buffers via org-drill-modeCraig Jennings2026-05-261-14/+14
| | | | | | | | org-drill-add-cloze-fontification ran on org-font-lock-set-keywords-hook, which fires in every org buffer, and pushed the cloze rule into org's global org-font-lock-extra-keywords. The cloze regexp is built from the [ and ] delimiters, so an org priority cookie like [#A] matched the cloze pattern and got fontified as a cloze in every org buffer, colliding with org's headline fontification and stripping the heading's org-level-N face. I replaced the global install with org-drill-mode, a buffer-local minor mode that adds the cloze keywords only to its own buffer via font-lock-add-keywords. org-drill-auto-enable-mode (default on) turns the mode on from org-mode-hook in buffers that hold drill cards, so existing drill files keep their cloze highlighting while plain org buffers stay clean. Highlighting still respects org-drill-use-visible-cloze-face-p. The cloze regexp itself is unchanged, so the single-line cloze constraint from #38 is preserved.
* test: cover org-drill-test-display dev helperCraig Jennings2026-05-051-0/+30
| | | | | | | | | | I added a test for the developer helper `org-drill-test-display' that mocks `org-drill-entry-f' to confirm the dispatcher fires and that the zysygy tag is toggled off again on exit. I also added a small case for `org-drill-test-display-rescheduler' that verifies it runs `org-drill-display-answer-hook' and waits on read-key-sequence. Coverage moved from 92.7% to 93.2%.
* test: cover org-drill-add-cloze-fontification flag branchCraig Jennings2026-05-051-0/+19
| | | | | | | | | I added a couple of cases for `org-drill-add-cloze-fontification': when `org-drill-use-visible-cloze-face-p' is t, a fontification spec gets pushed onto `org-font-lock-extra-keywords'; with the flag nil, the list is left alone. Coverage moved from 92.1% to 92.3%.
* test: cover SM5 random-noise, --read-key-sequence input-method dance, ↵Craig Jennings2026-05-051-0/+79
goto-heading error I added small-branch tests for the SM5 dispersal-factor multiplier when `org-drill-add-random-noise-to-intervals-p' is t, `org-drill--read-key-sequence' deactivating/reactivating an active input method (and skipping the dance when none is active), and the error branch in `org-drill-goto-drill-entry-heading' when no parent heading carries the drill tag. Coverage moved from 92.1% to 92.1%.