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.
This commit is contained in:
Stefan Kangas 2022-01-04 03:50:59 +01:00
parent cd7e7834ba
commit 417a3ebaa2

View file

@ -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)