| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
dired-mark advances point itself, so the loop's extra forward-line skipped every other file (and could mark a directory). Use dired-get-filename + file-directory-p with an if/else: a marked file line advances once via dired-mark, non-file/directory lines advance manually. Replaces the regex line predicate (retired with its mock test) with a real-Dired marked-count test.
|
|
|
Sibling tests covered the pure helpers; the interactive wrappers were the gap. 13 new tests cover:
- `cj/dirvish-open-html-in-eww`: HTML file -> `eww-open-file`, non-HTML -> message.
- `cj/dirvish-duplicate-file`: copies file with `-copy` suffix, errors on no-file / directory / declined-overwrite.
- `cj/dired-mark-all-visible-files`: marks file lines, skips directory lines (via `cj/--dired-line-is-directory-p`).
- `cj/dired-copy-path-as-kill`: errors outside dired-mode, kills resolved path, formats as org-link when asked.
- `cj/dirvish-open-file-manager-here`: uses `cj/external-open-command` when available, falls back to `xdg-open` shell command otherwise, messages when current dir can't be resolved.
The decline-overwrite test uses real temp files instead of `cl-letf`-overriding `file-directory-p` + `file-exists-p` -- native-comp's trampoline cache breaks when several built-ins get redefined in the same test.
|