diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-05 14:28:01 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-05 14:28:01 -0500 |
| commit | ac734cfd3208cb3d50c24ff1eb371c75fe71d59c (patch) | |
| tree | a6c1b69c8dd3c917e662a07782fa8c11a6636661 /tests/test-org-drill-cloze-and-scheduling-helpers.el | |
| parent | ddc4b289a0ad96407746ea267e6b4def33b1503b (diff) | |
| download | org-drill-ac734cfd3208cb3d50c24ff1eb371c75fe71d59c.tar.gz org-drill-ac734cfd3208cb3d50c24ff1eb371c75fe71d59c.zip | |
test: cover the org-drill main entry and hypothetical-next-review-date dispatch
I added tests for the public `org-drill' command that mock
`org-drill-entries' so the orchestrator runs in batch: empty buffer →
'no pending' message, populated buffer → entry loop runs, cram=t flag
flips the session's cram-mode slot, resume-p skips entry collection.
I also extended the cloze + scheduling helpers file with sm2 and
simple8 coverage for `org-drill-hypothetical-next-review-date'.
Coverage moved from 89.0% to 89.8%.
Diffstat (limited to 'tests/test-org-drill-cloze-and-scheduling-helpers.el')
| -rw-r--r-- | tests/test-org-drill-cloze-and-scheduling-helpers.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test-org-drill-cloze-and-scheduling-helpers.el b/tests/test-org-drill-cloze-and-scheduling-helpers.el index ba6503c..1ee4c61 100644 --- a/tests/test-org-drill-cloze-and-scheduling-helpers.el +++ b/tests/test-org-drill-cloze-and-scheduling-helpers.el @@ -115,6 +115,22 @@ symbol itself." (should (equal 0 (org-drill-hypothetical-next-review-date 1))) (should (equal 0 (org-drill-hypothetical-next-review-date 2))))) +(ert-deftest test-org-drill-hypothetical-next-review-date-sm2-algorithm () + "With sm2 selected, hypothetical-next-review-date returns a positive number." + (with-fresh-drill-entry + (let ((org-drill-spaced-repetition-algorithm 'sm2)) + (let ((days (org-drill-hypothetical-next-review-date 5))) + (should (numberp days)) + (should (>= days 0)))))) + +(ert-deftest test-org-drill-hypothetical-next-review-date-simple8-algorithm () + "With simple8 selected, hypothetical-next-review-date returns a positive number." + (with-fresh-drill-entry + (let ((org-drill-spaced-repetition-algorithm 'simple8)) + (let ((days (org-drill-hypothetical-next-review-date 5))) + (should (numberp days)) + (should (>= days 0)))))) + (ert-deftest test-org-drill-hypothetical-next-review-date-quality-monotonic () "Higher quality means longer next-interval — the curve should be monotonic non-decreasing across q=3 → q=5 on a virgin card." |
