mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
Add check for expected backtrace in module calls.
* test.el (mod-test-non-local-exit-signal-test): Compare actual backtrace to expected backtrace.
This commit is contained in:
parent
a749b55d8e
commit
05bfebfc91
@ -64,7 +64,21 @@
|
||||
;;
|
||||
|
||||
(ert-deftest mod-test-non-local-exit-signal-test ()
|
||||
(should-error (mod-test-signal)))
|
||||
(should-error (mod-test-signal))
|
||||
(let (debugger-args backtrace)
|
||||
(should-error
|
||||
(let ((debugger (lambda (&rest args)
|
||||
(setq debugger-args args
|
||||
backtrace (with-output-to-string (backtrace)))
|
||||
(cl-incf num-nonmacro-input-events)))
|
||||
(debug-on-signal t))
|
||||
(mod-test-signal)))
|
||||
(should (equal debugger-args '(error (error . 56))))
|
||||
(should (string-match-p
|
||||
(rx bol " internal--module-call(" (+ nonl) ?\) ?\n
|
||||
" apply(internal--module-call " (+ nonl) ?\) ?\n
|
||||
" mod-test-signal()" eol)
|
||||
backtrace))))
|
||||
|
||||
(ert-deftest mod-test-non-local-exit-throw-test ()
|
||||
(should (equal
|
||||
|
Loading…
Reference in New Issue
Block a user