From 0d32f8f6df9406c12306d97592446408ba7984e3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 5 May 2026 14:06:48 -0500 Subject: test: cover map-leitner-capture, response-mode, timer, sm2/simple8 dispatch I added direct tests for `org-drill-map-leitner-capture' (route by DRILL_LEITNER_BOX), the response-mode exit-kind handlers (quit/edit/skip/ tags/rtn), `org-drill-presentation-timer-cancel', and the sm2/simple8 branches of `org-drill-smart-reschedule''s algorithm dispatcher. Coverage moved from 80.6% to 81.8%. --- tests/test-org-drill-smart-reschedule.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests/test-org-drill-smart-reschedule.el') diff --git a/tests/test-org-drill-smart-reschedule.el b/tests/test-org-drill-smart-reschedule.el index 49eddb0..6fbf3d6 100644 --- a/tests/test-org-drill-smart-reschedule.el +++ b/tests/test-org-drill-smart-reschedule.el @@ -91,6 +91,24 @@ because the cond compared nil with `=' before the type-guard." (let ((scheduled (current-scheduled-time-string))) (should scheduled))))) +;;;; Algorithm dispatch (covers the cl-case branches in smart-reschedule) + +(ert-deftest test-org-drill-smart-reschedule-sm2-algorithm-schedules () + "With sm2 selected, smart-reschedule still produces a SCHEDULED stamp." + (with-fresh-drill-entry + (with-fixed-now + (let ((org-drill-spaced-repetition-algorithm 'sm2)) + (org-drill-smart-reschedule 5)) + (should (current-scheduled-time-string))))) + +(ert-deftest test-org-drill-smart-reschedule-simple8-algorithm-schedules () + "With simple8 selected, smart-reschedule still produces a SCHEDULED stamp." + (with-fresh-drill-entry + (with-fixed-now + (let ((org-drill-spaced-repetition-algorithm 'simple8)) + (org-drill-smart-reschedule 5)) + (should (current-scheduled-time-string))))) + ;;;; Property side-effects (ert-deftest test-org-drill-smart-reschedule-writes-drill-properties () -- cgit v1.2.3