diff options
Diffstat (limited to 'test/src/thread-tests.el')
-rw-r--r-- | test/src/thread-tests.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el index 4631882186c..4e7b052cba0 100644 --- a/test/src/thread-tests.el +++ b/test/src/thread-tests.el @@ -209,5 +209,20 @@ (string= "hi bob" (condition-name (make-condition-variable (make-mutex) "hi bob"))))) +(defun call-error () + "Call `error'." + (error "Error is called")) + +;; This signals an error internally; the error should be caught. +(defun thread-custom () + (defcustom thread-custom-face 'highlight + "Face used for thread customizations." + :type 'face + :group 'widget-faces)) + +(ert-deftest thread-errors () + "Test what happens when a thread signals an error." + (should (threadp (make-thread #'call-error "call-error"))) + (should (threadp (make-thread #'thread-custom "thread-custom")))) ;;; threads.el ends here |