aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorPhilipp Stephani2015-12-20 21:59:10 +0100
committerPhilipp Stephani2017-03-26 22:17:34 +0200
commit05bfebfc91bc053435287f560aeb956926d31583 (patch)
tree461b2b424c19d17e4471aac335a442eecc619093 /modules
parenta749b55d8ee530797ccff693ad302541257d0415 (diff)
downloademacs-05bfebfc91bc053435287f560aeb956926d31583.tar.gz
emacs-05bfebfc91bc053435287f560aeb956926d31583.zip
Add check for expected backtrace in module calls.
* test.el (mod-test-non-local-exit-signal-test): Compare actual backtrace to expected backtrace.
Diffstat (limited to 'modules')
-rw-r--r--modules/mod-test/test.el16
1 files changed, 15 insertions, 1 deletions
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 @@
64;; 64;;
65 65
66(ert-deftest mod-test-non-local-exit-signal-test () 66(ert-deftest mod-test-non-local-exit-signal-test ()
67 (should-error (mod-test-signal))) 67 (should-error (mod-test-signal))
68 (let (debugger-args backtrace)
69 (should-error
70 (let ((debugger (lambda (&rest args)
71 (setq debugger-args args
72 backtrace (with-output-to-string (backtrace)))
73 (cl-incf num-nonmacro-input-events)))
74 (debug-on-signal t))
75 (mod-test-signal)))
76 (should (equal debugger-args '(error (error . 56))))
77 (should (string-match-p
78 (rx bol " internal--module-call(" (+ nonl) ?\) ?\n
79 " apply(internal--module-call " (+ nonl) ?\) ?\n
80 " mod-test-signal()" eol)
81 backtrace))))
68 82
69(ert-deftest mod-test-non-local-exit-throw-test () 83(ert-deftest mod-test-non-local-exit-throw-test ()
70 (should (equal 84 (should (equal