emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f8478dc: Fixup for bug#51037


From: Filipp Gunbin
Subject: master f8478dc: Fixup for bug#51037
Date: Thu, 18 Nov 2021 09:04:18 -0500 (EST)

branch: master
commit f8478dc133839fc9e2b395bef0c8e8f1d7d18b35
Author: Filipp Gunbin <fgunbin@fastmail.fm>
Commit: Filipp Gunbin <fgunbin@fastmail.fm>

    Fixup for bug#51037
    
    * lisp/emacs-lisp/ert.el (ert-batch-backtrace-line-length): Fix
    docstring.
    (ert-run-tests-batch): Remove redundand let-binding.
    (ert-run-tests-interactively): Fix interactive spec.
---
 lisp/emacs-lisp/ert.el | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index dc9cbc4..946193e 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -101,12 +101,10 @@ produce extremely long lines in backtraces and lengthy 
delays in
 forming them.  This variable governs the target maximum line
 length by manipulating these two variables while printing stack
 traces.  Setting this variable to t will re-use the value of
-`backtrace-line-length' while print stack traces in ERT batch
-mode.  A value of nil will short-circuit this mechanism; line
-lengths will be completely determined by `ert-batch-line-length'
-and `ert-batch-line-level'.  Any other value will be temporarily
-bound to `backtrace-line-length' when producing stack traces
-in batch mode.")
+`backtrace-line-length' while printing stack traces in ERT batch
+mode.  Any other value will be temporarily bound to
+`backtrace-line-length' when producing stack traces in batch
+mode.")
 
 (defface ert-test-result-expected '((((class color) (background light))
                                      :background "green1")
@@ -1451,13 +1449,9 @@ Returns the stats object."
                (message "Test %S backtrace:" (ert-test-name test))
                (with-temp-buffer
                  (let ((backtrace-line-length
-                        (cond
-                         ((eq ert-batch-backtrace-line-length t)
-                          backtrace-line-length)
-                         ((eq ert-batch-backtrace-line-length nil)
-                          nil)
-                         (t
-                          ert-batch-backtrace-line-length)))
+                        (if (eq ert-batch-backtrace-line-length t)
+                            backtrace-line-length
+                          ert-batch-backtrace-line-length))
                        (print-level ert-batch-print-level)
                        (print-length ert-batch-print-length))
                    (insert (backtrace-to-string
@@ -2062,8 +2056,7 @@ SELECTOR works as described in `ert-select-tests'."
            (read
             (completing-read (format-prompt "Run tests" default)
                              obarray #'ert-test-boundp nil nil
-                             'ert--selector-history default nil)))
-         nil))
+                             'ert--selector-history default nil)))))
   (let (buffer listener)
     (setq listener
           (lambda (event-type &rest event-args)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]