[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup fbb790b 278/340: test: Add tests for buttercup-s
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup fbb790b 278/340: test: Add tests for buttercup-started and buttercup-reporter-batch-color |
Date: |
Thu, 16 Dec 2021 14:59:50 -0500 (EST) |
branch: elpa/buttercup
commit fbb790b9013b368440048885a5787af59e9ce4e6
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
test: Add tests for buttercup-started and buttercup-reporter-batch-color
Add a local matcher for equal-including-properties and use it for both
buttercup-reporter-batch and buttercup-reporter-batch-color.
---
tests/test-buttercup.el | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 66061b6..1e058d2 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -1064,8 +1064,10 @@ text properties using `ansi-color-apply'."
;;;;;;;;;;;;;
;;; Reporters
+(buttercup-define-matcher-for-binary-function
+ :to-equal-including-properties equal-including-properties)
-(describe "The batch reporter"
+(describe "The batch reporters"
:var (print-buffer)
(let (parent-suite child-suite spec)
(before-each
@@ -1099,13 +1101,24 @@ text properties using `ansi-color-apply'."
(it "should print the number of specs"
(let ((buttercup-reporter-batch--failures nil))
(buttercup-reporter-batch 'buttercup-started (list parent-suite)))
- (expect (buttercup-output) :to-equal "Running 1 specs.\n\n"))
+ (expect (buttercup-output) :to-equal-including-properties "Running 1
specs.\n\n"))
+
+ (it "should color-print the number of specs with the default color"
+ (let (buttercup-reporter-batch--failures)
+ (buttercup-reporter-batch-color 'buttercup-started (list
parent-suite)))
+ (expect (buttercup-output) :to-equal-including-properties "Running 1
specs.\n\n"))
(it "should print the number of skipped specs"
(let ((buttercup-reporter-batch--failures nil))
(buttercup-suite-add-child child-suite skipped)
(buttercup-reporter-batch 'buttercup-started (list parent-suite)))
- (expect (buttercup-output) :to-equal "Running 1 out of 2 specs.\n\n")))
+ (expect (buttercup-output) :to-equal-including-properties "Running 1
out of 2 specs.\n\n"))
+
+ (it "should color-print the number of skipped specs with the default
color"
+ (let (buttercup-reporter-batch--failures)
+ (buttercup-suite-add-child child-suite skipped)
+ (buttercup-reporter-batch-color 'buttercup-started (list
parent-suite)))
+ (expect (buttercup-output) :to-equal-including-properties "Running 1
out of 2 specs.\n\n")))
(describe "on the suite-started event"
(it "should emit an indented suite description"
- [nongnu] elpa/buttercup 9c4b473 237/340: test: Add missing apostrophe in spec title, (continued)
- [nongnu] elpa/buttercup 9c4b473 237/340: test: Add missing apostrophe in spec title, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 90654ec 238/340: Update some docstrings, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 178c795 242/340: README: Add '-L .' to test runner example, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup fc4276a 247/340: Make it possible to abort test run cleanly, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup dbcd3d4 256/340: Calculate total test run time with current-time, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c83ba7d 268/340: Extract function buttercup-elapsed-time-string, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 38cfa6f 270/340: Fix spy-on on Emacs 24.3 for symbols that are not fbound, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 81bfed4 272/340: test: Add utility function send-string-to-ansi-buffer, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup cf4eee8 274/340: test: Verify output in the "The batch reporter" suite, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4159111 275/340: test: Verify full line for reporter spec-done tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup fbb790b 278/340: test: Add tests for buttercup-started and buttercup-reporter-batch-color,
ELPA Syncer <=
- [nongnu] elpa/buttercup d563e18 281/340: test: Add color tests for suite-done, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b910b71 285/340: Extract buttercup--indented-description from the batch reporters, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e71a40f 287/340: Make sure carriage movement characters are not colorized, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a22fc29 288/340: Bump version: 1.21 → 1.22, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup dde8651 290/340: Add new function buttercup--spec-mark-pending and use it, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c59110b 291/340: test: Extend with-local-buttercup with some key arguments, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d443ecb 293/340: Clarify patterns in bin/buttercup, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4d1acb8 294/340: test: Rewrite buttercup-run tests using spies, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 37223e4 296/340: actions: Run actions on push for all branches, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 50c7fc2 297/340: Switch to pcase in spec-done case of buttercup-reporter-batch, ELPA Syncer, 2021/12/16