diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-30 08:33:31 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-30 09:13:53 -0500 |
| commit | eaf3848e7893326f2ddaaab23633106e0afe8fd8 (patch) | |
| tree | 9950289ddbfd1ab39eccc51c350a521fd3377717 /modules | |
| parent | 0fb3ae438277146a1167cc46ed6c3218a14281ff (diff) | |
| download | dotemacs-eaf3848e7893326f2ddaaab23633106e0afe8fd8.tar.gz dotemacs-eaf3848e7893326f2ddaaab23633106e0afe8fd8.zip | |
test(org-noter-config): cover preferred-split, slug, template, predicates
Four new test files for the pure-and-near-pure helpers in
org-noter-config.el. The interactive heavyweights (cj/org-noter-start,
cj/org-noter-insert-note-dwim, cj/org-noter--toggle-notes-window,
cj/org-noter--find-notes-file, cj/org-noter--create-notes-file) are
out of scope for this pass — they need org-noter loaded and a real
session, or a substantial internal/wrapper split before they can be
tested without spinning up real PDFs and EPUBs.
- preferred-split: 5 tests walking the 1.4 width-to-height threshold
from both sides plus a square-frame boundary.
- title-to-slug: 7 tests covering multi-word, single-word, mixed
punctuation, leading/trailing junk, collapsed runs, digits, and
empty input.
- generate-notes-template: 5 tests with org-id-uuid mocked, asserting
the rendered template carries the UUID, the dual ROAM_REFS /
NOTER_DOCUMENT pointers, the title-and-category lines, the
ReadingNotes filetag, and the trailing Notes heading.
- predicates: 13 tests covering cj/org-noter--in-document-p,
cj/org-noter--in-notes-file-p, cj/org-noter--session-active-p,
cj/org-noter--get-document-path, and cj/org-noter--extract-document-title.
Mocks derived-mode-p, org-entry-get, and buffer-file-name at the
boundary so the suite doesn't require pdf-tools or nov.
The require chain in each test file is user-constants → keybindings →
org-noter-config because cj/org-noter-notes-directory captures
roam-dir from user-constants and the prefix-map binding at the bottom
of org-noter-config references cj/custom-keymap.
30 new tests, all passing. Full suite green.
Diffstat (limited to 'modules')
0 files changed, 0 insertions, 0 deletions
