[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 459bffb 282/340: test: Add color tests for butte
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 459bffb 282/340: test: Add color tests for buttercup-done |
Date: |
Thu, 16 Dec 2021 14:59:51 -0500 (EST) |
branch: elpa/buttercup
commit 459bffb233428f0f7171826a5c3b4fc5af7f5e32
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
test: Add color tests for buttercup-done
---
tests/test-buttercup.el | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 29ecf12..9726184 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -1246,6 +1246,25 @@ text properties using `ansi-color-apply'."
(expect (buttercup-output) :to-match
"Ran 10 specs, 6 failed, in [0-9]+.[0-9]+[mu]?s.\n"))
+ (it "should color-print `0 failed' specs in green"
+ (let (buttercup-reporter-batch--failures)
+ (buttercup-reporter-batch-color 'buttercup-done nil))
+ (expect (buttercup-output) :to-match
+ "Ran 10 specs, 0 failed, in [0-9]+.[0-9]+[mu]?s.\n")
+ (expect (substring (buttercup-output) 0 (length "Ran 10 specs, 0
failed, in"))
+ :to-equal-including-properties
+ (ansi-color-apply "Ran 10 specs,\e[32m 0 failed\e[0m, in")))
+
+ (it "should color-print `X failed' specs in red"
+ (setq failed-specs 6)
+ (let (buttercup-reporter-batch--failures)
+ (buttercup-reporter-batch-color 'buttercup-done nil))
+ (expect (buttercup-output) :to-match
+ "Ran 10 specs, 6 failed, in [0-9]+.[0-9]+[mu]?s.\n")
+ (expect (substring (buttercup-output) 0 (length "Ran 10 specs, 6
failed, in"))
+ :to-equal-including-properties
+ (ansi-color-apply "Ran 10 specs,\e[31m 6 failed\e[0m, in")))
+
(it "should print a summary separating run and pending specs"
(setq pending-specs 3)
(let (buttercup-reporter-batch--failures)
@@ -1253,6 +1272,17 @@ text properties using `ansi-color-apply'."
(expect (buttercup-output) :to-match
"Ran 7 out of 10 specs, 0 failed, in [0-9]+.[0-9]+[mu]?s.\n"))
+ (it "should color-print pending spec count in default color"
+ (setq pending-specs 3)
+ (let (buttercup-reporter-batch--failures)
+ (buttercup-reporter-batch 'buttercup-done nil))
+ (expect (buttercup-output) :to-match
+ "Ran 7 out of 10 specs, 0 failed, in [0-9]+.[0-9]+[mu]?s.\n")
+ (expect (substring (buttercup-output)
+ 0 (length "Ran 7 out of 10 specs, 0 failed, in"))
+ :to-equal-including-properties
+ "Ran 7 out of 10 specs, 0 failed, in"))
+
(it "should not raise any error even if a spec failed"
(setf (buttercup-spec-status spec) 'failed)
(let (buttercup-reporter-batch--failures)
- [nongnu] elpa/buttercup 360953b 266/340: test: Only run tests found in the tests/ directory, (continued)
- [nongnu] elpa/buttercup 360953b 266/340: test: Only run tests found in the tests/ directory, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 25bc00d 273/340: test: Set up suite "The batch reporter" to use fake terminal, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5c9f80d 279/340: test: Add color tests for buttercup-suite-started and -done, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2be9ad3 280/340: test: Add color tests for spec-done, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0e94f6e 303/340: Lift buttercup-done handling into buttercup-reporter-batch, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f1f403b 308/340: Remove buttercup-reporter-batch-color, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup fce5fa5 313/340: Optionally fail when loading old elc files, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6c3bb75 318/340: Accept a list of regexes in buttercup-mark-skipped, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9dda405 320/340: Document use with Eldev, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 06201f2 335/340: Print :to-have-been-called-with args as sexp for consistency, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 459bffb 282/340: test: Add color tests for buttercup-done,
ELPA Syncer <=
- [nongnu] elpa/buttercup a1c7bff 101/340: Do not ignore errors when after-each succeeds, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b120003 108/340: Merge pull request #60 from howdoicomputer/feature/windows-bin-support, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 06c9699 104/340: Merge pull request #58 from Fuco1/to-equal-as-set, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a6d9bde 105/340: Support more emacs parameters useful for pre-test initialization, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup abf2abe 109/340: Exclude hidden files and dirs in test root, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f60ed2a 119/340: Bump version: 1.5 → 1.6, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 677d6d3 118/340: Merge pull request #70 from xendk/color-output, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d8dc80d 126/340: Bump version: 1.6 → 1.7, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b6deeff 128/340: Set Emacs 24.3 as minimum and clean outdated code (close #89), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 39c7d8c 132/340: Allow ERT "should" and similar to work with buttercup, ELPA Syncer, 2021/12/16