aboutsummaryrefslogtreecommitdiff
path: root/tests/test-custom-buffer-file-print-diff-eww.el
Commit message (Collapse)AuthorAgeFilesLines
* test: make subr mocks variadic for native-comp, add arity meta-testCraig Jennings4 days1-7/+7
| | | | | | | | 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(custom-buffer-file): cover print spooler, diff, eww, email helpersCraig Jennings2026-05-141-0/+189
Sibling tests cover the move/rename/copy/clear family. The remaining helpers and dispatchers were uncovered: - `cj/print--resolve-spooler`: explicit-string on PATH, explicit-string missing (error), `auto` prefers lpr, `auto` falls back to lp, `auto` with nothing on PATH (error), `auto` returns cached value, invalid spooler symbol (error). - `cj/copy-buffer-name`: places the current buffer's name on the kill ring with a confirmation message. - `cj/view-buffer-in-eww`: hands the file off to `eww-open-file` when visiting a file, errors otherwise. - `cj/--email-handle-is-type-p`: prefix-matches content-types, handles nil handle without signaling. - `cj/--diff-with-regular-diff`: writes a unified diff into the target buffer with header + diff output. - `cj/diff-buffer-with-file`: errors when not visiting a file, messages "No differences" when diff -q returns 0. 16 new tests total. `call-process`, `executable-find`, `eww-open-file`, `mm-handle-type`, `diff-mode` are stubbed.