Commit 05bfebfc authored by Philipp Stephani's avatar Philipp Stephani

Add check for expected backtrace in module calls.

* test.el (mod-test-non-local-exit-signal-test): Compare actual
  backtrace to expected backtrace.
parent a749b55d
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment