[Top][All Lists]

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

Need message-fn arg back in ert-run-tests-interactively

From: Robert Weiner
Subject: Need message-fn arg back in ert-run-tests-interactively
Date: Sun, 9 Jul 2023 11:49:15 -0400

In ert.el of Emacs 27.1, we have a simple ability to override the 'message' function when running ert tests interactively by setting the message-fn argument here:

;; Should OUTPUT-BUFFER-NAME and MESSAGE-FN really be arguments here?
;; They are needed only for our automated self-tests at the moment.
;; Or should there be some other mechanism?
(defun ert-run-tests-interactively (selector
                                    &optional output-buffer-name message-fn)

But in recent Emacs versions this function takes only the selector argument, with no clear way of how to override messaging behavior so that a message from a test case (rather than ert itself) can remain in the minibuffer after a test case finishes:

(defun ert-run-tests-interactively (selector)
  "Run the tests specified by SELECTOR and display the results in a buffer.

SELECTOR works as described in `ert-select-tests'."

This would be very useful behavior to have back.  Is there any simple way to do it now or can you add it back in?



reply via email to

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