12345678910111213141516171819202122232425262728293031323334 |
- (eval-when-compile (require 'cl))
- (require 'ert)
- (require 'ein-dev)
- (ein:dev-require-all :ignore-p (lambda (f) (equal f "ein-mumamo.el")))
- (eval-when-compile
- ;; do it also at compile time.
- (ein:dev-require-all :ignore-p (lambda (f) (equal f "ein-mumamo.el"))))
- (defun eintest:assert-keymap-fboundp (keymap)
- (let (assert-fboundp)
- (setq assert-fboundp
- (lambda (event value)
- (cond
- ((keymapp value)
- (map-keymap assert-fboundp value))
- ((and (listp value) (eq (car value) 'menu-item))
- (funcall assert-fboundp (cadr value) (caddr value)))
- (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)
|