]> git.eshelyaron.com Git - emacs.git/commitdiff
Unbreak a few unit tests that rely on lack of backtraces
authorPhilipp Stephani <phst@google.com>
Mon, 7 Dec 2020 10:57:17 +0000 (11:57 +0100)
committerPhilipp Stephani <phst@google.com>
Mon, 7 Dec 2020 10:59:06 +0000 (11:59 +0100)
* 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.

test/lisp/emacs-lisp/edebug-tests.el
test/lisp/emacs-lisp/gv-tests.el

index 8aae26a1aca5affea82ba9e9cea8800e9753453b..2c340c44408f3d5b2c6d6d4f4cfe4e8cb53560b3 100644 (file)
@@ -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)
index 29e4273b4786145689ec78e2a2f8a59fce53586e..8fc6b514692392e7624e885a6c4289b1cb6f4397 100644 (file)
     (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")))))
                     "-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))))))