Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Fix test for recent prefix-name change
Browse files Browse the repository at this point in the history
  • Loading branch information
justbur committed Oct 5, 2016
1 parent fe73d08 commit 5b36146
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions which-key-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,20 @@
(ert-deftest which-key-test-prefix-declaration ()
"Test `which-key-declare-prefixes' and
`which-key-declare-prefixes-for-mode'. See Bug #109."
(let* (test-mode which-key-prefix-name-alist which-key-prefix-title-alist)
(let* (test-mode which-key-key-based-description-replacement-alist)
(which-key-declare-prefixes
"SPC C-c" '("complete" . "complete title")
"SPC C-k" "cancel")
(which-key-declare-prefixes-for-mode 'test-mode
"C-c C-c" '("complete" . "complete title")
"C-c C-k" "cancel")
(should (equal
(assoc-string "SPC C-k" which-key-prefix-name-alist)
(assoc-string "SPC C-k" which-key-key-based-description-replacement-alist)
'("SPC C-k" . "cancel")))
(should (equal
(assoc-string
"C-c C-c" (cdr (assq 'test-mode which-key-prefix-name-alist)))
'("C-c C-c" . "complete")))
(pp which-key-prefix-title-alist)
(should (equal
(assoc-string "SPC C-k" which-key-prefix-title-alist)
'("SPC C-k" . "cancel")))
(should (equal
(assoc-string
"C-c C-c" (cdr (assq 'test-mode which-key-prefix-title-alist)))
'("C-c C-c" . "complete title")))))
"C-c C-c" (cdr (assq 'test-mode which-key-key-based-description-replacement-alist)))
'("C-c C-c" . ("complete" . "complete title"))))))

(provide 'which-key-tests)
;;; which-key-tests.el ends here

0 comments on commit 5b36146

Please sign in to comment.