diff options
Diffstat (limited to 'test/src/keymap-tests.el')
-rw-r--r-- | test/src/keymap-tests.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el index 69aa7238493..de3012b5764 100644 --- a/test/src/keymap-tests.el +++ b/test/src/keymap-tests.el @@ -125,7 +125,7 @@ ;; ...) (ert-deftest keymap-lookup-key/mixed-case () - "Backwards compatibility behaviour (Bug#50752)." + "Backwards compatibility behavior (Bug#50752)." (let ((map (make-keymap))) (define-key map [menu-bar foo bar] 'foo) (should (eq (lookup-key map [menu-bar foo bar]) 'foo)) @@ -418,6 +418,18 @@ g .. h foo (should-error (text-char-description ?\M-c)) (should-error (text-char-description ?\s-c))) +(ert-deftest test-non-key-events () + ;; Dummy command. + (declare-function keymap-tests-command nil) + (should (null (where-is-internal 'keymap-tests-command))) + (keymap-set global-map "C-c g" #'keymap-tests-command) + (should (equal (where-is-internal 'keymap-tests-command) '([3 103]))) + (keymap-set global-map "<keymap-tests-event>" #'keymap-tests-command) + (should (equal (where-is-internal 'keymap-tests-command) + '([keymap-tests-event] [3 103]))) + (make-non-key-event 'keymap-tests-event) + (should (equal (where-is-internal 'keymap-tests-command) '([3 103])))) + (provide 'keymap-tests) ;;; keymap-tests.el ends here |