aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/emacs-module-tests.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index e4593044ecd..e30980b5993 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -289,4 +289,24 @@ Return A + B"
289 (should (member '(provide . mod-test) entries)) 289 (should (member '(provide . mod-test) entries))
290 (should (member '(defun . mod-test-sum) entries)))) 290 (should (member '(defun . mod-test-sum) entries))))
291 291
292(ert-deftest mod-test-sleep-until ()
293 "Check that `mod-test-sleep-until' either returns normally or quits.
294Interactively, you can try hitting \\[keyboard-quit] to quit."
295 (dolist (arg '(nil t))
296 ;; Guard against some caller setting `inhibit-quit'.
297 (with-local-quit
298 (condition-case nil
299 (should (eq (with-local-quit
300 ;; Because `inhibit-quit' is nil here, the next
301 ;; form either quits or returns `finished'.
302 (mod-test-sleep-until
303 ;; Interactively, run for 5 seconds to give the
304 ;; user time to quit. In batch mode, run only
305 ;; briefly since the user can't quit.
306 (float-time (time-add nil (if noninteractive 0.1 5)))
307 ;; should_quit or process_input
308 arg))
309 'finished))
310 (quit)))))
311
292;;; emacs-module-tests.el ends here 312;;; emacs-module-tests.el ends here