[:tools ein] ensure keybindings still valid

This commit is contained in:
dickmao 2020-03-03 07:18:19 -05:00
parent ac199de936
commit e5a91d2912
2 changed files with 24 additions and 0 deletions

View file

@ -12,6 +12,7 @@
evil evil
:tools :tools
pass pass
ein
:lang :lang
org org
web) web)

View file

@ -0,0 +1,23 @@
;; -*- no-byte-compile: t; -*-
;;; tools/ein/test/test-ein.el
(describe "tools/ein"
:var (project-root)
(require! :tools ein)
(require 'ein-notebook)
(before-each
(spy-on 'doom-project-root :and-call-fake (lambda () project-root)))
(it "keymap defs still valid"
(dolist (km (list ein:notebook-mode-map ein:notebooklist-mode-map))
(cl-labels ((validate-km
(km)
(map-keymap (lambda (type def)
(cond ((keymapp def)
(validate-km def))
(t (should-not
(and (symbolp def) (not (commandp def)))))))
km)))
(validate-km km)))))