summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/shortdoc-tests.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-01-04 03:50:59 +0100
committerStefan Kangas <stefan@marxist.se>2022-01-04 03:52:42 +0100
commit417a3ebaa2d5e6673398808637395b485fe6ae76 (patch)
tree9abe84529ba3a3a243f49f170f24c30898dc40ee /test/lisp/emacs-lisp/shortdoc-tests.el
parentcd7e7834ba5d40e3181054f02693f64ace6fd6aa (diff)
downloademacs-417a3ebaa2d5e6673398808637395b485fe6ae76.tar.gz
emacs-417a3ebaa2d5e6673398808637395b485fe6ae76.tar.bz2
emacs-417a3ebaa2d5e6673398808637395b485fe6ae76.zip
Test that buffer exists in shortdoc-all-groups-work
* test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work): Test that the shortdoc buffer was created.
Diffstat (limited to 'test/lisp/emacs-lisp/shortdoc-tests.el')
-rw-r--r--test/lisp/emacs-lisp/shortdoc-tests.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/lisp/emacs-lisp/shortdoc-tests.el b/test/lisp/emacs-lisp/shortdoc-tests.el
index 326d43eead4..8515b9fdfb9 100644
--- a/test/lisp/emacs-lisp/shortdoc-tests.el
+++ b/test/lisp/emacs-lisp/shortdoc-tests.el
@@ -47,10 +47,13 @@
(ert-deftest shortdoc-all-groups-work ()
"Test that all defined shortdoc groups display correctly."
(dolist (group (mapcar (lambda (x) (car x)) shortdoc--groups))
- (unwind-protect
- (shortdoc-display-group group)
- (when-let ((buf (get-buffer (format "*Shortdoc %s*" group))))
- (kill-buffer buf)))))
+ (let ((buf-name (format "*Shortdoc %s*" group)) buf)
+ (unwind-protect
+ (progn
+ (shortdoc-display-group group)
+ (should (setq buf (get-buffer buf-name))))
+ (when buf
+ (kill-buffer buf))))))
(provide 'shortdoc-tests)