[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 417a3ebaa2 1/2: Test that buffer exists in shortdoc-all-groups-wo
From: |
Stefan Kangas |
Subject: |
master 417a3ebaa2 1/2: Test that buffer exists in shortdoc-all-groups-work |
Date: |
Mon, 3 Jan 2022 21:52:54 -0500 (EST) |
branch: master
commit 417a3ebaa2d5e6673398808637395b485fe6ae76
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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.
---
test/lisp/emacs-lisp/shortdoc-tests.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/test/lisp/emacs-lisp/shortdoc-tests.el
b/test/lisp/emacs-lisp/shortdoc-tests.el
index 326d43eead..8515b9fdfb 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)