[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 86e8637e32 3/7: Extract buttercup--reporter-batc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 86e8637e32 3/7: Extract buttercup--reporter-batch-preprint-spec-p |
Date: |
Thu, 28 Mar 2024 18:59:30 -0400 (EDT) |
branch: elpa/buttercup
commit 86e8637e32c4f5e73e05b17db8fdc90f25158ee1
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
Extract buttercup--reporter-batch-preprint-spec-p
... from buttercup-reporter-batch.
---
buttercup.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index a1b695cbb8..8925b4ac58 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -1820,6 +1820,14 @@ Two special statuses can be listed in
(string= (buttercup-spec-failure-description spec) "PENDING"))
))
+(defun buttercup--reporter-batch-preprint-spec-p (spec)
+ "Return non-nil if the SPEC description should be printed at `spec-started'."
+ (not (or buttercup-reporter-batch-quiet-statuses
+ ;; Do not 'pre-print' in github actions unless color is
+ ;; disabled. See #181.
+ (and buttercup-color
+ (string-match-p "[\n\v\f]" (buttercup-spec-description
spec))))))
+
(defun buttercup-reporter-batch (event arg)
"A reporter that handles batch sessions.
@@ -1844,10 +1852,8 @@ EVENT and ARG are described in `buttercup-reporter'."
(push arg buttercup-reporter-batch--suite-stack)
(buttercup--print "%s\n" (buttercup--indented-description arg))))
(`spec-started
- (or buttercup-reporter-batch-quiet-statuses
- (and buttercup-color
- (string-match-p "[\n\v\f]" (buttercup-spec-description arg)))
- (buttercup--print "%s" (buttercup--indented-description arg))))
+ (when (buttercup--reporter-batch-preprint-spec-p arg)
+ (buttercup--print "%s" (buttercup--indented-description arg))))
(`spec-done
(when (and buttercup-reporter-batch-quiet-statuses
(not (buttercup-reporter-batch--quiet-spec-p arg)))
- [nongnu] elpa/buttercup updated (be25a149fc -> a1a86b027f), ELPA Syncer, 2024/03/28
- [nongnu] elpa/buttercup e9636f8ba4 1/7: tests: Extend with-local-buttercup to handle envvars, ELPA Syncer, 2024/03/28
- [nongnu] elpa/buttercup c4e9001254 6/7: scripts/release: Don't push anything from the release script, ELPA Syncer, 2024/03/28
- [nongnu] elpa/buttercup 86e8637e32 3/7: Extract buttercup--reporter-batch-preprint-spec-p,
ELPA Syncer <=
- [nongnu] elpa/buttercup 0868e7a9de 4/7: Use buttercup--reporter-batch-preprint-spec-p to skip \r, ELPA Syncer, 2024/03/28
- [nongnu] elpa/buttercup b46b0e29a2 2/7: Disable all colored output when the NO_COLOR env var is set, ELPA Syncer, 2024/03/28
- [nongnu] elpa/buttercup a1a86b027f 7/7: Bump version: 1.34 → 1.35, ELPA Syncer, 2024/03/28
- [nongnu] elpa/buttercup d990a98ac1 5/7: Avoid printing double lines in GitHub Actions, ELPA Syncer, 2024/03/28