* test/lisp/emacs-lisp/find-func-tests.el: New file (for bug#43393)
* lisp/emacs-lisp/ert-x.el (ert-simulate-keys): New macro. * test/lisp/international/mule-tests.el (mule-cmds--test-universal-coding-system-argument): Use it and enable the test also in batch mode.
This commit is contained in:
parent
15d2f6af00
commit
e408f2fab2
3 changed files with 63 additions and 5 deletions
|
@ -177,6 +177,18 @@ test for `called-interactively' in the command will fail."
|
|||
(cl-assert (not unread-command-events) t)
|
||||
return-value))
|
||||
|
||||
(defmacro ert-simulate-keys (keys &rest body)
|
||||
"Execute BODY with KEYS as pseudo-interactive input."
|
||||
(declare (debug t) (indent 1))
|
||||
`(let ((unread-command-events
|
||||
;; Add some C-g to try and make sure we still exit
|
||||
;; in case something goes wrong.
|
||||
(append ,keys '(?\C-g ?\C-g ?\C-g)))
|
||||
;; Tell `read-from-minibuffer' not to read from stdin when in
|
||||
;; batch mode.
|
||||
(executing-kbd-macro t))
|
||||
,@body))
|
||||
|
||||
(defun ert-run-idle-timers ()
|
||||
"Run all idle timers (from `timer-idle-list')."
|
||||
(dolist (timer (copy-sequence timer-idle-list))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue