branch: elpa/buttercup
commit b3acf50988b0ca338da280390d4624226a93b74b
Author: Ola Nilsson <[email protected]>
Commit: Ola Nilsson <[email protected]>
Lift spec-started handling into buttercup-reporter-batch
... from buttercup-reporter-batch-color. Use the buttercup-color
variable to differentiate the two cases.
---
buttercup.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index bf1ec9f..20d75f3 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1618,7 +1618,9 @@ EVENT and ARG are described in `buttercup-reporter'."
(`suite-started
(buttercup--print "%s\n" (buttercup--indented-description arg)))
(`spec-started
- (buttercup--print "%s" (buttercup--indented-description arg)))
+ (unless (and buttercup-color
+ (string-match-p "[\n\v\f]" (buttercup-spec-description
arg)))
+ (buttercup--print "%s" (buttercup--indented-description arg))))
(`spec-done
(pcase (buttercup-spec-status arg)
(`passed) ; do nothing
@@ -1703,9 +1705,6 @@ colors.
EVENT and ARG are described in `buttercup-reporter'."
(pcase event
- (`spec-started
- (unless (string-match-p "[\n\v\f]" (buttercup-spec-description arg))
- (buttercup-reporter-batch event arg)))
(`spec-done
;; Carriage returns (\r) should not be colorized. It would mess
;; up color handling in Emacs compilation buffers using