From 4d866fc0f561b023cbc15ee52891cddfa1a354ef Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 21 Jan 2022 12:32:10 +0100 Subject: Interpret a "" value of EMACS_TEST_VERBOSE as "off" * doc/misc/ert.texi (Running Tests in Batch Mode): Adjust doc. * lisp/emacs-lisp/ert.el (ert-run-tests-batch): Allow overriding the EMACS_TEST_VERBOSE variable by setting it to "" (bug#53313). --- lisp/emacs-lisp/ert.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/ert.el') diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 9c6b0e15bbe..b6c5b7d6b91 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1423,7 +1423,8 @@ Returns the stats object." (message "%9s %S%s" (ert-string-for-test-result result nil) (ert-test-name test) - (if (getenv "EMACS_TEST_VERBOSE") + (if (cl-plusp + (length (getenv "EMACS_TEST_VERBOSE"))) (ert-reason-for-test-result result) "")))) (message "%s" "")) @@ -1435,7 +1436,8 @@ Returns the stats object." (message "%9s %S%s" (ert-string-for-test-result result nil) (ert-test-name test) - (if (getenv "EMACS_TEST_VERBOSE") + (if (cl-plusp + (length (getenv "EMACS_TEST_VERBOSE"))) (ert-reason-for-test-result result) "")))) (message "%s" "")) -- cgit v1.2.3