aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-entry-status.el
Commit message (Collapse)AuthorAgeFilesLines
* test: fix date-sensitive days-since-creation assertionCraig Jennings2026-05-111-7/+13
| | | | | | test-org-drill-entry-days-since-creation-with-date-added pinned DATE_ADDED to a hardcoded 2026-04-01 and asserted 33-35 days, which only holds when the wall clock is near 2026-05-05. The with-fixed-now mock that was supposed to make it deterministic rebinds `current-time`. But the DATE_ADDED branch of org-drill-entry-days-since-creation goes through `org-time-stamp-to-now`, which reads the real clock. The rebind never reaches it. CI went red once the calendar moved past the +35-day window. I rewrote the test to derive DATE_ADDED 34 calendar days before today (via decode-time / encode-time, so month rollover and DST are handled) and assert the function returns exactly 34. No mock needed. Both sides read the same real clock.
* test: add entry-status, days-since-creation, and overdue ordering coverageCraig Jennings2026-05-051-0/+212
Plus a docs fix to org-drill-order-overdue-entries' header comment. 16 ERT tests covering: - org-drill-entry-status: non-drill nil, empty entry nil, virgin :new, future :future, low-quality :failed, due+short-interval :young, due+long-interval :old, very-overdue :overdue, skipped-leech :unscheduled, three-element return shape - org-drill-entry-days-since-creation: with DATE_ADDED, missing without flag (nil), missing with use-last-interval-p flag (overdue+interval) - org-drill-order-overdue-entries: empty stays empty, non-lapsed sorted by DUE desc, lapsed split (by DUE crossing threshold, not AGE) appearing after sorted by AGE desc Fixed misleading header comment at line 2888 — it claimed the lapse split was by AGE, but the code uses DUE (cl-second). This matches the semantic gate in org-drill--entry-lapsed-p, so the code was right and the comment was stale. Updated the comment to state the actual three-step sort.