aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-small-branch-coverage.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor: take card-state in org-drill-determine-next-interval-sm5Craig Jennings2026-05-271-1/+4
| | | | | | | | Stage 4 of #147. sm5 now takes (state quality of-matrix &optional delta-days) instead of nine positional args, binding the recall fields from the struct at the top so the algorithm body is unchanged. Both call-site branches pass the state they already hold, dropping the per-branch accessor unpacking. The testutil adapter test-scheduler--call-sm5 keeps the sm5 test calls a one-symbol rename per site. I also kept the return as the existing list, matching the stage-3 refinement: the goal is reducing the input signature, and changing the return shape would force the shared return-extractors and every return-read to change for no real gain. Also folds in two stage-3 follow-ons I missed when sm2 landed: a direct sm5 call in tests/test-org-drill-small-branch-coverage.el now uses the new struct API inline, and five direct sm2 calls in the simple-workflow integration test now go through the testutil adapter (the integration file picks up the testutil-scheduler require). Caught by running make test-integration this stage, which I should have run on the sm2 stage.
* 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%.