aboutsummaryrefslogtreecommitdiff
path: root/test/helpful-unit-test.el
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2019-04-07 21:43:02 +0100
committerWilfred Hughes <me@wilfred.me.uk>2019-04-07 21:43:51 +0100
commit67b7592f970776776d243cacf7363eb93bc28ebc (patch)
tree21c8d6fd25441074e96a64db753d0b0869ee4e45 /test/helpful-unit-test.el
parent0a83a7b028881a7a463ba5dfc7646ca98afc48c7 (diff)
Render keyboard maros in keymap pretty view
Fixes #202
Diffstat (limited to 'test/helpful-unit-test.el')
-rw-r--r--test/helpful-unit-test.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el
index d4fd835..01e8067 100644
--- a/test/helpful-unit-test.el
+++ b/test/helpful-unit-test.el
@@ -620,6 +620,17 @@ associated a lambda with a keybinding."
;; Don't crash on anonymous functions in a keymap.
(helpful--keymap-keys keymap)))
+(ert-deftest helpful--format-keymap--keyboard-macros ()
+ (let* ((keymap (make-keymap)))
+ ;; A keyboard macro can be a string or a vector.
+ (define-key keymap "a" "ABC")
+ (define-key keymap "b" [TAB])
+
+ (should
+ (equal
+ (helpful--format-keymap keymap)
+ "a Keyboard Macro\nb Keyboard Macro"))))
+
(defun helpful--dummy-command ()
(interactive))