aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/help-fns-tests.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index ef42d4bda29..1d6c062979f 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -123,4 +123,32 @@ Return first line of the output of (describe-function-1 FUNC)."
123 (goto-char (point-min)) 123 (goto-char (point-min))
124 (should (looking-at "^font-lock-comment-face is ")))) 124 (should (looking-at "^font-lock-comment-face is "))))
125 125
126
127;;; Tests for describe-keymap
128(ert-deftest help-fns-test-describe-keymap/symbol ()
129 (describe-keymap 'minibuffer-local-must-match-map)
130 (with-current-buffer "*Help*"
131 (should (looking-at "^minibuffer-local-must-match-map is"))))
132
133(ert-deftest help-fns-test-describe-keymap/value ()
134 (describe-keymap minibuffer-local-must-match-map)
135 (with-current-buffer "*Help*"
136 (should (looking-at "^key"))))
137
138(ert-deftest help-fns-test-describe-keymap/not-keymap ()
139 (should-error (describe-keymap nil))
140 (should-error (describe-keymap emacs-version)))
141
142(ert-deftest help-fns-test-describe-keymap/let-bound ()
143 (let ((foobar minibuffer-local-must-match-map))
144 (describe-keymap foobar)
145 (with-current-buffer "*Help*"
146 (should (looking-at "^key")))))
147
148(ert-deftest help-fns-test-describe-keymap/dynamically-bound-no-file ()
149 (setq help-fns-test--describe-keymap-foo minibuffer-local-must-match-map)
150 (describe-keymap 'help-fns-test--describe-keymap-foo)
151 (with-current-buffer "*Help*"
152 (should (looking-at "^help-fns-test--describe-keymap-foo is"))))
153
126;;; help-fns-tests.el ends here 154;;; help-fns-tests.el ends here