From: Philipp Stephani Date: Sun, 20 Dec 2015 20:59:10 +0000 (+0100) Subject: Add check for expected backtrace in module calls. X-Git-Tag: emacs-26.0.90~522^2~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=05bfebfc91bc053435287f560aeb956926d31583;p=emacs.git Add check for expected backtrace in module calls. * test.el (mod-test-non-local-exit-signal-test): Compare actual backtrace to expected backtrace. --- diff --git a/modules/mod-test/test.el b/modules/mod-test/test.el index 181f13208ec..caa807d3005 100644 --- a/modules/mod-test/test.el +++ b/modules/mod-test/test.el @@ -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