From 6ab5e65f200a52aa44aa7fed09e792fefe656f85 Mon Sep 17 00:00:00 2001 From: "Ryan C. Thompson" Date: Sun, 11 Dec 2016 22:00:49 -0800 Subject: [PATCH] Print test output properly with "--win" and "-no-win" --- ert-runner.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ert-runner.el b/ert-runner.el index 095a91f..11e0c82 100644 --- a/ert-runner.el +++ b/ert-runner.el @@ -105,8 +105,10 @@ Arguments: stats, test, result") This bypasses the normal output capturing ert-runner does, and is primarily intended for reporters." - (princ (apply #'format format args) - t)) + (let ((message (apply #'format format args))) + (if ert-runner-output-file + (f-append-text message 'utf-8 ert-runner-output-file) + (princ message t)))) ;; Work around Emacs bug #16121, which is fixed in Emacs 24.4, but still present ;; in former releases. See ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16121