aboutsummaryrefslogtreecommitdiff
path: root/tests/test-lorem-optimum.el
diff options
context:
space:
mode:
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