branch: master
commit 187808ab119e5dc116e0757272a0777bd80b5946
Author: Joseph Brenner <[email protected]>
Commit: Joseph Brenner <[email protected]>
TAP output in batch mode now goes to stdout, not stderr
---
test-simple.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/test-simple.el b/test-simple.el
index 408be8e..1fda8a5 100644
--- a/test-simple.el
+++ b/test-simple.el
@@ -289,13 +289,17 @@ additional message to be displayed."
(interactive)
(unless test-info (setq test-info test-simple-info))
(test-simple-describe-failures test-info)
- (if noninteractive
- (progn
- (switch-to-buffer "*test-simple*")
- (message "%s" (buffer-substring (point-min) (point-max)))
- )
- (switch-to-buffer-other-window "*test-simple*")
- ))
+ (cond (noninteractive
+ (set-buffer "*test-simple*")
+ (cond ((getenv "USE_TAP")
+ (princ (format "%s\n" (buffer-string)))
+ )
+ (t ;; non-TAP goes to stderr (backwards compatibility)
+ (message "%s" (buffer-substring (point-min) (point-max)))
+ )))
+ (t ;; interactive
+ (switch-to-buffer-other-window "*test-simple*")
+ )))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Reporting