From 2ca2212f7312061c5462c8826774857e2455c1a8 Mon Sep 17 00:00:00 2001 From: Jimmy Yuen Ho Wong Date: Tue, 7 Jul 2020 14:17:00 +0100 Subject: [PATCH] better tests --- test/lisp/use-package/use-package-tests.el | 12 +++++++++--- 1 file 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 "" '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 "" 'ignore 'test-map) + (should (eq (lookup-key test-map (kbd "")) 'ignore)) + (let ((binding (cl-find "" 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 -- 2.39.2