[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bind-map 873c26d467 89/97: Get basic inheritance tests wor
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bind-map 873c26d467 89/97: Get basic inheritance tests working |
Date: |
Thu, 20 Jan 2022 07:59:30 -0500 (EST) |
branch: elpa/bind-map
commit 873c26d467d6077857f78332c59c54d5d66a641d
Author: justbur <justin@burkett.cc>
Commit: justbur <justin@burkett.cc>
Get basic inheritance tests working
---
bind-map-tests.el | 88 ++++++++++++++++++++++++++++---------------------------
1 file changed, 45 insertions(+), 43 deletions(-)
diff --git a/bind-map-tests.el b/bind-map-tests.el
index d9e05a54c8..2653c0c99a 100644
--- a/bind-map-tests.el
+++ b/bind-map-tests.el
@@ -97,47 +97,49 @@
bind-map-major-modes-alist))
'(mm1 mm2 mm3 mm4 mm5 mm6)))))
-;; (ert-deftest bind-map-test-minor-inheritance ()
-;; (let (minor-mode-list minor-mode-map-alist minor-mode-alist)
-;; (bind-map bind-map-test-map-minor-parent
-;; :keys ("C-a")
-;; :evil-keys ("a")
-;; :evil-states (motion))
-;; (bind-map-for-mode-inherit bind-map-test-map-minor-child
-;; bind-map-test-map-minor-parent
-;; :minor-modes (bind-map-test-minor-mode-inheritance))
-;; (message "%s" (pp bind-map-test-map-minor-child-root-map))
-;; (defvar bind-map-test-minor-mode-inheritance)
-;; (define-key bind-map-test-map-minor-child "a" 'asdf)
-;; (message "%s" (pp bind-map-test-map-minor-child-root-map))
-;; (let ((bind-map-test-minor-mode-inheritance t))
-;; (message "%s" (pp bind-map-test-map-minor-child-root-map))
-;; (should (eq (key-binding "\C-aa") 'asdf))
-;; (with-temp-buffer
-;; (evil-local-mode 1)
-;; (evil-motion-state)
-;; (should (eq (key-binding "aa") 'asdf))))
-;; (setq bind-map-test-map-minor-child (make-sparse-keymap)
-;; bind-map-test-map-minor-child-prefix (make-sparse-keymap))
-;; (global-set-key "\C-a" nil)))
+(ert-deftest bind-map-test-minor-inheritance ()
+ (let (minor-mode-list minor-mode-map-alist minor-mode-alist)
+ (bind-map bind-map-test-map-minor-parent
+ :keys ("C-a")
+ :evil-keys ("a")
+ :evil-states (motion))
+ ;; FIXME:
+ (eval
+ '(bind-map-for-mode-inherit bind-map-test-map-minor-child
+ bind-map-test-map-minor-parent
+ :minor-modes (bind-map-test-minor-mode-inheritance)))
+ (message "%s" (pp bind-map-test-map-minor-child-root-map))
+ (defvar bind-map-test-minor-mode-inheritance)
+ (define-key bind-map-test-map-minor-child "a" "e")
+ (message "%s" (pp bind-map-test-map-minor-child-root-map))
+ (let ((bind-map-test-minor-mode-inheritance t))
+ (message "%s" (pp bind-map-test-map-minor-child-root-map))
+ (should (string= (key-binding "\C-aa") "e"))
+ (evil-local-mode 1)
+ (evil-motion-state)
+ (should (string= (key-binding "aa") "e")))
+ (setq bind-map-test-map-minor-child (make-sparse-keymap)
+ bind-map-test-map-minor-child-prefix (make-sparse-keymap))
+ (global-set-key "\C-a" nil)))
-;; (ert-deftest bind-map-test-major-inheritance ()
-;; (let (minor-mode-map-alist)
-;; (bind-map bind-map-test-map-major-parent
-;; :keys ("C-a")
-;; :evil-keys ("a")
-;; :evil-states (motion))
-;; (bind-map-for-mode-inherit bind-map-test-map-major-child
-;; bind-map-test-map-major-parent
-;; :major-modes (emacs-lisp-mode))
-;; (define-key bind-map-test-map-major-child "a" 'asdf)
-;; (with-temp-buffer
-;; (evil-normalize-keymaps)
-;; (emacs-lisp-mode)
-;; (should (eq (key-binding "\C-aa") 'asdf))
-;; (evil-local-mode 1)
-;; (evil-motion-state)
-;; (should (eq (key-binding "aa") 'asdf)))
-;; (setq bind-map-test-map-major-child (make-sparse-keymap)
-;; bind-map-test-map-major-child-prefix (make-sparse-keymap))
-;; (global-set-key "\C-a" nil)))
+(ert-deftest bind-map-test-major-inheritance ()
+ (let (minor-mode-map-alist)
+ (bind-map bind-map-test-map-major-parent
+ :keys ("C-a")
+ :evil-keys ("a")
+ :evil-states (motion))
+ ;; FIXME:
+ (eval
+ '(bind-map-for-mode-inherit bind-map-test-map-major-child
+ bind-map-test-map-major-parent
+ :major-modes (emacs-lisp-mode)))
+ (define-key bind-map-test-map-major-child "a" "f")
+ (evil-normalize-keymaps)
+ (emacs-lisp-mode)
+ (should (string= (key-binding "\C-aa") "f"))
+ (evil-local-mode 1)
+ (evil-motion-state)
+ (should (string= (key-binding "aa") "f"))
+ (setq bind-map-test-map-major-child (make-sparse-keymap)
+ bind-map-test-map-major-child-prefix (make-sparse-keymap))
+ (global-set-key "\C-a" nil)))
- [nongnu] elpa/bind-map 38dc69ab80 49/97: Make sure major-mode keys are activated initially, (continued)
- [nongnu] elpa/bind-map 38dc69ab80 49/97: Make sure major-mode keys are activated initially, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map df2f5081e1 27/97: Use custom kbd command, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map b30c22f7f9 33/97: Report symbol name in previously added error msg, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 7ab7ae8dd3 62/97: Fix cask file, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 8e3df1f4cf 36/97: Use add-to-list for mm list and defvar prefix, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map ce11d259bf 42/97: Update commentary to match README, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 32a3361b3b 67/97: Bring back evil-define-minor-mode-key, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 56e4a914c2 82/97: Fix tests, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 797c2124f8 86/97: Restructure tests, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 6e1ba6edbd 94/97: Update README, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 873c26d467 89/97: Get basic inheritance tests working,
ELPA Syncer <=
- [nongnu] elpa/bind-map 6977e0fec5 96/97: Bump version to 1.1.2, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map b59d7bbab7 40/97: Add note about dependence on evil to README, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 5c6f17939c 28/97: Get rid of eval-after-loads to fix evil bindings, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 80c38c4052 61/97: Add badges, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 4cccf8fb82 23/97: Add configuration var for default map suffix, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 7a4d329a60 18/97: Correct wrong package names, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 4cf9dfd1cb 81/97: Fix declare form, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map ddce68ed1d 53/97: Move evil-local-mode hook next to var, ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map 2a5fcbd947 73/97: Revert "Fix incorrect check of override mode in local hook", ELPA Syncer, 2022/01/20
- [nongnu] elpa/bind-map f4fad049d0 70/97: Bump to version 1.0, ELPA Syncer, 2022/01/20