summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2020-12-07 11:57:17 +0100
committerPhilipp Stephani <phst@google.com>2020-12-07 11:59:06 +0100
commit2d989e81b730061397501033f355cbb300894573 (patch)
tree846a8bff66df831ccfc45fe81a7a9468b7cf2035
parent3970f4ac405516ad3d1aba5079c0754ec1dc5da1 (diff)
downloademacs-2d989e81b730061397501033f355cbb300894573.tar.gz
Unbreak a few unit tests that rely on lack of backtraces
* test/lisp/emacs-lisp/gv-tests.el (gv-dont-define-expander-in-file) (gv-dont-define-expander-other-file): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-default-config): Suppress backtraces in batch mode to unbreak unit tests.
-rw-r--r--test/lisp/emacs-lisp/edebug-tests.el5
-rw-r--r--test/lisp/emacs-lisp/gv-tests.el11
2 files changed, 12 insertions, 4 deletions
diff --git a/test/lisp/emacs-lisp/edebug-tests.el b/test/lisp/emacs-lisp/edebug-tests.el
index 8aae26a1aca..2c340c44408 100644
--- a/test/lisp/emacs-lisp/edebug-tests.el
+++ b/test/lisp/emacs-lisp/edebug-tests.el
@@ -97,7 +97,10 @@ back to the top level.")
;; sit-on interferes with keyboard macros.
(edebug-sit-on-break nil)
- (edebug-continue-kbd-macro t))
+ (edebug-continue-kbd-macro t)
+
+ ;; don't print backtraces, otherwise error messages don't match
+ (backtrace-on-error-noninteractive nil))
,@body))
(defmacro edebug-tests-with-normal-env (&rest body)
diff --git a/test/lisp/emacs-lisp/gv-tests.el b/test/lisp/emacs-lisp/gv-tests.el
index 29e4273b478..8fc6b514692 100644
--- a/test/lisp/emacs-lisp/gv-tests.el
+++ b/test/lisp/emacs-lisp/gv-tests.el
@@ -83,7 +83,10 @@
(with-temp-buffer
(call-process (concat invocation-directory invocation-name)
nil '(t t) nil
- "-Q" "-batch" "--eval" (prin1-to-string `(byte-compile-file ,el))
+ "-Q" "-batch"
+ "--eval" (prin1-to-string
+ `(let ((backtrace-on-error-noninteractive nil))
+ (byte-compile-file ,el)))
"-l" elc)
(should (equal (buffer-string)
"Symbol's function definition is void: \\(setf\\ gv-test-foo\\)\n")))))
@@ -133,8 +136,10 @@
"-Q" "-batch" "--eval" (prin1-to-string `(byte-compile-file ,el))
"-l" elc
"--eval"
- (prin1-to-string '(progn (setf (gv-test-foo gv-test-pair) 99)
- (message "%d" (car gv-test-pair)))))
+ (prin1-to-string
+ '(let ((backtrace-on-error-noninteractive nil))
+ (setf (gv-test-foo gv-test-pair) 99)
+ (message "%d" (car gv-test-pair)))))
(should (string-match
"\\`Symbol.s function definition is void: \\\\(setf\\\\ gv-test-foo\\\\)\n\\'"
(buffer-string))))))