aboutsummaryrefslogtreecommitdiff
path: root/tests/test-lorem-optimum.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-11 18:17:22 -0500
committerCraig Jennings <c@cjennings.net>2026-05-11 18:17:22 -0500
commit54d376712c63e0ed947f7368cfead8d95f8a3f21 (patch)
treebfc8d0b392c2c79af58e6de5560e91d3bd5622b8 /tests/test-lorem-optimum.el
parent8d096854f015025751fcbe80e531577ea0b70093 (diff)
downloaddotemacs-54d376712c63e0ed947f7368cfead8d95f8a3f21.tar.gz
dotemacs-54d376712c63e0ed947f7368cfead8d95f8a3f21.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-lorem-optimum.el')
-rw-r--r--tests/test-lorem-optimum.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-lorem-optimum.el b/tests/test-lorem-optimum.el
index 40bdc684..f928c972 100644
--- a/tests/test-lorem-optimum.el
+++ b/tests/test-lorem-optimum.el
@@ -247,5 +247,11 @@
(should (> (length result) 0))
(should (string-match-p "^[[:upper:]]" result)))))
+(ert-deftest test-title-generation-empty-chain-returns-empty-string ()
+ "Boundary: an empty Markov chain (`cj/markov-random-key' returns nil) yields
+an empty string, not an error."
+ (let ((cj/lipsum-chain (cj/markov-chain-create)))
+ (should (equal "" (cj/lipsum-title)))))
+
(provide 'test-lorem-optimum)
;;; test-lorem-optimum.el ends here