aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-session-state.el
Commit message (Collapse)AuthorAgeFilesLines
* feat: add org-drill-on-timeout-action to drop unfinished cards at the time limitCraig Jennings2026-05-271-0/+42
| | | | | | Implements upstream #56. When org-drill-maximum-duration is reached, the session used to keep presenting the in-progress card and the again-queue until they drained, so the only way out was to finish them or interrupt. I added the defcustom org-drill-on-timeout-action with a discard-current value that ends the session as soon as the limit is hit, leaving the dropped cards untouched: they keep their existing scheduling and turn up again next session. The default, finish-current, preserves the old behavior. The gate lives in org-drill-entries-pending-p, the single predicate the drill loop checks between cards. Under discard-current past the limit, the in-progress and again items stop counting as pending, so the loop ends instead of draining them.
* test: add session-state predicate coverageCraig Jennings2026-05-051-0/+265
23 ERT tests covering the queue control flow: - org-drill-entries-pending-p: empty session, current-item slot, again-entries bypassing limits, item-count limit interaction - org-drill-pending-entry-count: empty, sums all queues, current-item marker check - org-drill-maximum-duration-reached-p: nil-duration disables, cram bypasses, fresh session under limit, old session over limit - org-drill-maximum-item-count-reached-p: nil disables, cram bypasses, under/at limit, includes-failed-items-p flag - org-drill--entry-lapsed-p: feature flag gate, threshold respected - org-drill-free-markers: explicit list, t-frees-everything