aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-noter-config-commands.el
Commit message (Collapse)AuthorAgeFilesLines
* test: make subr mocks variadic for native-comp, add arity meta-testCraig Jennings2026-06-211-3/+3
| | | | | | | | Re-enabling native-comp surfaced a suite-wide fragility. When a test redefines a C primitive (or a native-compiled function), native-comp routes native callers through a trampoline that calls the mock with the primitive's maximum arity. A fixed-arity mock narrower than the primitive then throws wrong-number-of-arguments, intermittently, as the eln-cache fills. I swept every arity-narrow subr mock to append &rest _ (188 sites, preserving any named args the body uses), and added tests/test-meta-subr-mock-arity.el, which fails make test on any subr mock too narrow for the primitive's arity. The rule isn't "never mock a subr". The suite mocks message and completing-read freely. It's "a subr mock must accept the primitive's arity." Background, the three failure modes, and the research are in docs/native-comp-subr-mocking.org.
* test(org-noter-config): cover document path, find/create, session, start, insertCraig Jennings2026-05-141-0/+243
Sibling tests covered the preferred-split, title-to-slug, notes-template, and in-document / in-notes-file predicates. This batch fills in the rest: - `cj/org-noter--get-document-path`: pdf-view-mode uses buffer-file-name, nov-mode uses `nov-file-name`, unrelated mode returns nil. - `cj/org-noter--extract-document-title`: strips the extension. - `cj/org-noter--find-notes-file`: returns the file containing the doc-path, nil when no doc or no match. - `cj/org-noter--create-notes-file`: writes the template when absent. - `cj/org-noter--session-active-p`: nil when unbound, non-nil when set. - `cj/org-noter--toggle-notes-window`: deletes when visible, requests start when hidden. - `cj/org-noter-start`: routes through the cond -- toggle in doc+session, switch-window in notes+session, message elsewhere. - `cj/org-noter-insert-note-dwim`: with active session inserts directly; without one, starts then inserts. org-noter / pdf-view / nov / org-id primitives are stubbed.