From: Stefan Kangas Date: Tue, 4 Jan 2022 02:50:59 +0000 (+0100) Subject: Test that buffer exists in shortdoc-all-groups-work X-Git-Tag: emacs-29.0.90~3276 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=417a3ebaa2d5e6673398808637395b485fe6ae76;p=emacs.git 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. --- 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)