Skip to content

Commit

Permalink
Adapt to new calling convention of ert--print-backtrace
Browse files Browse the repository at this point in the history
Fixes #42
  • Loading branch information
phst committed Nov 5, 2017
1 parent edc21c0 commit 4b6e6cb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ert-runner.el
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,18 @@ nil, `ert-runner-test-path' will be used instead."
(ert-runner-message "Test %S backtrace:\n\n"
(ert-test-name test))
(with-temp-buffer
(ert--print-backtrace
(ert-test-result-with-condition-backtrace
result))
(let ((backtrace
(ert-test-result-with-condition-backtrace result)))
;; The signature of ‘ert--print-backtrace’ has changed in
;; Emacs 26: it now takes two arguments. We try to call it
;; with the new calling convention first and fall back to
;; the old one in case of error.
;; FIXME: We shouldn’t be using internal functions from
;; ert.el in the first place.
(condition-case nil
(ert--print-backtrace backtrace nil)
(wrong-number-of-arguments
(ert--print-backtrace backtrace))))
(goto-char (point-min))
(while (not (eobp))
(let ((start (point))
Expand Down

0 comments on commit 4b6e6cb

Please sign in to comment.