mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
better tests
This commit is contained in:
parent
de49954965
commit
2ca2212f73
1 changed files with 9 additions and 3 deletions
|
@ -1936,11 +1936,17 @@
|
||||||
(define-prefix-command 'my/map)
|
(define-prefix-command 'my/map)
|
||||||
(bind-key "<f1>" 'my/map nil nil))))
|
(bind-key "<f1>" 'my/map nil nil))))
|
||||||
|
|
||||||
(defvar test-map (make-keymap))
|
|
||||||
|
|
||||||
(ert-deftest bind-key/845 ()
|
(ert-deftest bind-key/845 ()
|
||||||
(bind-key "C-c f" 'ignore 'test-map)
|
(defvar test-map (make-keymap))
|
||||||
(describe-personal-keybindings))
|
(bind-key "<f1>" 'ignore 'test-map)
|
||||||
|
(should (eq (lookup-key test-map (kbd "<f1>")) 'ignore))
|
||||||
|
(let ((binding (cl-find "<f1>" personal-keybindings :test 'string= :key 'caar)))
|
||||||
|
(message "test-map %s" test-map)
|
||||||
|
(message "binding %s" binding)
|
||||||
|
(should (eq (cdar binding) 'test-map))
|
||||||
|
(should (eq (nth 1 binding) 'ignore))
|
||||||
|
(should (eq (nth 2 binding) nil))))
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; indent-tabs-mode: nil
|
;; indent-tabs-mode: nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue