diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:41:27 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:41:27 -0500 |
| commit | 82e748a0aadd651076b399c8dd45df480eeb4135 (patch) | |
| tree | d00c68cc3f760d17e71e3f732cc15f811ee6ccd4 /tests/test-system-lib-executable-find-or-warn.el | |
| parent | ea2ed6bc4b19ee9b388fda181017969cd17ee3dd (diff) | |
| download | dotemacs-82e748a0aadd651076b399c8dd45df480eeb4135.tar.gz dotemacs-82e748a0aadd651076b399c8dd45df480eeb4135.zip | |
refactor(dirvish): extract cj/--ediff-pair-from-files; fix 0-files crash
`cj/dired-ediff-files' had its pair-determination logic inline: count check, prompt fallback when only one file was marked, and the older-first ordering for `ediff-files'. Lift it into `cj/--ediff-pair-from-files' -- pure given the file list, an injected prompt thunk, and a newer-than-p comparator -- so tests stay independent of mtimes and the dired prompt.
While extracting, surface a latent bug: with zero marked files the original code fell through to `(file-newer-than-file-p nil nil)' and crashed with a wrong-type-argument error. Replace the crash with a clear `user-error' ("No files marked"), and add a regression test. The 3+ files case keeps its existing user-error message.
Five Normal/Boundary/Error tests cover both ordering directions, the one-file prompt path, and both error counts.
Diffstat (limited to 'tests/test-system-lib-executable-find-or-warn.el')
0 files changed, 0 insertions, 0 deletions
