1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Catch all non-local exits when running ERT tests.

See discussion in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76447.

* lisp/emacs-lisp/ert.el (ert--run-test-internal): Catch all non-local
exits in 'handler-bind'.
This commit is contained in:
Philipp Stephani 2025-08-18 11:23:26 +02:00
parent bf652e6844
commit 8747657dd8

View file

@ -813,7 +813,7 @@ This mainly sets up debugger-related bindings."
(letrec ((debugfun (lambda (err)
(ert--run-test-debugger test-execution-info
err debugfun))))
(handler-bind (((error quit) debugfun))
(handler-bind ((t debugfun))
(funcall (ert-test-body (ert--test-execution-info-test
test-execution-info))))))))
(ert-pass))