diff options
author | Jimmy Yuen Ho Wong <wyuenho@gmail.com> | 2020-07-07 14:17:00 +0100 |
---|---|---|
committer | Jimmy Yuen Ho Wong <wyuenho@gmail.com> | 2020-07-08 04:46:57 +0100 |
commit | 2ca2212f7312061c5462c8826774857e2455c1a8 (patch) | |
tree | 8cdd59cb88b8ea188bb6720f800aa7b1079b90f4 /test/lisp/use-package/use-package-tests.el | |
parent | de49954965ae4ab61b440d63eb4c0bf302a09b7d (diff) | |
download | emacs-2ca2212f7312061c5462c8826774857e2455c1a8.tar.gz emacs-2ca2212f7312061c5462c8826774857e2455c1a8.tar.bz2 emacs-2ca2212f7312061c5462c8826774857e2455c1a8.zip |
better tests
Diffstat (limited to 'test/lisp/use-package/use-package-tests.el')
-rw-r--r-- | test/lisp/use-package/use-package-tests.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el index 5d346d94df3..f0784315f75 100644 --- a/test/lisp/use-package/use-package-tests.el +++ b/test/lisp/use-package/use-package-tests.el @@ -1936,11 +1936,17 @@ (define-prefix-command 'my/map) (bind-key "<f1>" 'my/map nil nil)))) -(defvar test-map (make-keymap)) (ert-deftest bind-key/845 () - (bind-key "C-c f" 'ignore 'test-map) - (describe-personal-keybindings)) + (defvar test-map (make-keymap)) + (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: ;; indent-tabs-mode: nil |