[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup c59110b 291/340: test: Extend with-local-butterc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup c59110b 291/340: test: Extend with-local-buttercup with some key arguments |
Date: |
Thu, 16 Dec 2021 14:59:53 -0500 (EST) |
branch: elpa/buttercup
commit c59110b927940ec96db8f4c2ff4b494e18f88ce6
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>
test: Extend with-local-buttercup with some key arguments
New key arguments :color, :suites, and :reporter can be used to
overridde buttercup-color, buttersup-suites, and buttercup-reporter
respectively.
Allows code like
(with-local-buttercup :color t
...)
instead of
(with-local-buttercup
(let ((buttercup-color t)))
...)
---
tests/test-buttercup.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index cb472d3..076978d 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -36,8 +36,15 @@
items))
(defmacro with-local-buttercup (&rest body)
- "Execute BODY with local buttercup state variables."
+ "Execute BODY with local buttercup state variables.
+Keyword arguments kan be used to override the values of `buttercup-KEY'.
+\n(fn &keys COLOR SUITES REPORTER &rest BODY)"
(declare (debug t) (indent defun))
+ ;; extract keyword arguments
+ (let ((keys '(:color buttercup-color :suites buttercup-suites :reporter
buttercup-reporter))
+ extra-vars)
+ (while (plist-member keys (car body))
+ (push (list (plist-get keys (pop body)) (pop body)) extra-vars))
`(let (buttercup--after-all
buttercup--after-each
buttercup--before-all
@@ -46,8 +53,9 @@
buttercup--current-suite
(buttercup-reporter #'ignore)
buttercup-suites
- (buttercup-warning-buffer-name " *ignored buttercup warnings*"))
- ,@body))
+ (buttercup-warning-buffer-name " *ignored buttercup warnings*")
+ ,@(nreverse extra-vars))
+ ,@body)))
(defun send-string-to-ansi-buffer (buffer string)
"A `send-string-to-terminal' variant that sends STRING to BUFFER.
- [nongnu] elpa/buttercup 38cfa6f 270/340: Fix spy-on on Emacs 24.3 for symbols that are not fbound, (continued)
- [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, 2021/12/16
- [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 <=
- [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
- [nongnu] elpa/buttercup dd32cc7 298/340: test: Fix "should color-print pending spec count in default color", ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0debeec 299/340: test: Use with-local-buttercup in more tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b3acf50 304/340: Lift spec-started handling into buttercup-reporter-batch, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 24a7bb9 306/340: Extract buttercup-reporter-batch--print-spec-done-line, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c9addd5 307/340: Lift spec-done handling into buttercup-reporter-batch, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d6de872 309/340: Improve buttercup-reporter-batch--print-failed-spec-report, ELPA Syncer, 2021/12/16