diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-11 18:17:22 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-11 18:17:22 -0500 |
| commit | e0e0ecdb86e3ae1772adcedb50e6c9caa210cf17 (patch) | |
| tree | 41a16c890b1ffb588635266d45fc484beb85f9de /tests/test-calendar-sync-async-worker.el | |
| parent | fc94e5b7101f6677950c414c2822b451351ccc56 (diff) | |
| download | dotemacs-e0e0ecdb86e3ae1772adcedb50e6c9caa210cf17.tar.gz dotemacs-e0e0ecdb86e3ae1772adcedb50e6c9caa210cf17.zip | |
test: close coverage gaps from the preceding batch
Untested paths surfaced while reviewing the preceding feature/fix commits:
- calendar-sync: a test that `-L' precedes `-l' in the worker command (separate `member' checks wouldn't catch a swap), plus a `:slow' tag on the real-subprocess worker test so it stays out of the default `make test' run.
- org-capture cache: a killed marker buffer invalidates the entry and the next resolution rescans without erroring on the stale marker, `cj/org-capture-clear-target-cache' actually empties the hash, and non-`file+headline' targets (`file', `file+olp', `file+function') fall through to the original `org-capture-set-target-location'.
- lorem-optimum: `cj/lipsum-title' on an empty chain returns "", not an error.
- calibredb-epub: a negative `cj/nov-margin-percent' is clamped up to 0 (text takes the full window width).
- mu4e attachments: the default save directory comes from the part's `:target-dir' and falls back to `~/Downloads/', and asking for the attachment at point on a header line fails with a `user-error'.
Diffstat (limited to 'tests/test-calendar-sync-async-worker.el')
| -rw-r--r-- | tests/test-calendar-sync-async-worker.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-calendar-sync-async-worker.el b/tests/test-calendar-sync-async-worker.el index 6701df85..3bf803ec 100644 --- a/tests/test-calendar-sync-async-worker.el +++ b/tests/test-calendar-sync-async-worker.el @@ -37,8 +37,21 @@ (string-match-p "'(\"me@example\\.test\")" arg))) command)))) +(ert-deftest test-calendar-sync--worker-command-puts-L-before-l () + "Order: `-L module-dir' must precede `-l calendar-sync.el' so the sibling +load-path entry is in effect by the time the module load runs. Asserting both +via `member' separately wouldn't catch a swap." + (let* ((calendar-sync--module-file "/tmp/calendar-sync.el") + (calendar-sync-past-months 2) + (calendar-sync-future-months 6) + (calendar-sync-user-emails '("me@example.test")) + (command (calendar-sync--worker-command "/tmp/input.ics" "/tmp/output.org"))) + (should (< (cl-position "-L" command :test #'equal) + (cl-position "-l" command :test #'equal))))) + (ert-deftest test-calendar-sync--worker-command-loads-sibling-modules-without-init () "The worker command should load calendar-sync and sibling modules without init." + :tags '(:slow) (let* ((calendar-sync--module-file (expand-file-name "modules/calendar-sync.el" user-emacs-directory)) (command (append |
