<feed xmlns='http://www.w3.org/2005/Atom'>
<title>org-drill/tests/test-org-drill-entry-status.el, branch main</title>
<subtitle>Spaced-repetition flashcards for Org Mode
</subtitle>
<id>https://git.cjennings.net/org-drill/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/org-drill/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/org-drill/'/>
<updated>2026-05-11T12:32:34+00:00</updated>
<entry>
<title>test: fix date-sensitive days-since-creation assertion</title>
<updated>2026-05-11T12:32:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-11T12:32:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/org-drill/commit/?id=1a53381a176e99f5c7f9bed1589dbaf689f38390'/>
<id>urn:sha1:1a53381a176e99f5c7f9bed1589dbaf689f38390</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>test: add entry-status, days-since-creation, and overdue ordering coverage</title>
<updated>2026-05-05T09:19:24+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T09:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/org-drill/commit/?id=39a465d54964873980b1b3fe147e7e640bf74985'/>
<id>urn:sha1:39a465d54964873980b1b3fe147e7e640bf74985</id>
<content type='text'>
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.
</content>
</entry>
</feed>
