mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-06 17:41:40 -05:00

Otherwise, ein:notebook-mode-map--assert-fboundp fails. Note that it looks like that this test already failed in the worksheet branch, but I didn't notice. Also note that running test only in test-ein-modes.el pass without this fix.
27 lines
989 B
EmacsLisp
27 lines
989 B
EmacsLisp
(eval-when-compile (require 'cl))
|
|
(require 'ert)
|
|
|
|
(require 'ein-dev)
|
|
(ein:dev-require-all)
|
|
(eval-when-compile (ein:dev-require-all)) ; do it also at compile time.
|
|
|
|
|
|
(defun eintest:assert-keymap-fboundp (keymap)
|
|
(let (assert-fboundp)
|
|
(setq assert-fboundp
|
|
(lambda (event value) (if (keymapp value)
|
|
(map-keymap assert-fboundp value)
|
|
(when value ; nil is also valid in keymap
|
|
(should (commandp value))))))
|
|
(map-keymap assert-fboundp keymap)))
|
|
|
|
(defmacro eintest:test-keymap (keymap)
|
|
`(ert-deftest ,(intern (format "%s--assert-fboundp" keymap)) ()
|
|
(eintest:assert-keymap-fboundp ,keymap)))
|
|
|
|
(eintest:test-keymap ein:notebooklist-mode-map)
|
|
(eintest:test-keymap ein:notebook-mode-map)
|
|
(eintest:test-keymap ein:connect-mode-map)
|
|
(eintest:test-keymap ein:traceback-mode-map)
|
|
(eintest:test-keymap ein:shared-output-mode-map)
|
|
(eintest:test-keymap ein:pager-mode-map)
|