[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 246ddd7 218/340: Merge pull request #152 from Da
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 246ddd7 218/340: Merge pull request #152 from DarwinAwardWinner/suppress-warning-redirect |
Date: |
Thu, 16 Dec 2021 14:59:37 -0500 (EST) |
branch: elpa/buttercup
commit 246ddd764a986bcadfe1769c0d5aa27db6c7ae23
Merge: bd851d4 8b3cfad
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #152 from DarwinAwardWinner/suppress-warning-redirect
Update test for new warning capture suppression behavior
---
docs/writing-tests.md | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/docs/writing-tests.md b/docs/writing-tests.md
index 7be3782..cb72b28 100644
--- a/docs/writing-tests.md
+++ b/docs/writing-tests.md
@@ -640,7 +640,8 @@ By default, Buttercup captures any warning emitted during a
test and
displays them all after the test completes in order to keep the output
readable. If you need to suppress this (for example if your test deals
with the warnings itself), you can use the macro
-`buttercup-suppress-warning-capture`.
+`buttercup-suppress-warning-capture`, which works like `progn` but
+suppresses Buttercup's warning capturing within the body.
```Emacs-Lisp
(describe "A test"
@@ -650,8 +651,11 @@ with the warnings itself), you can use the macro
(it "can capture its own warnings as part of the test"
(buttercup-suppress-warning-capture
- (display-warning 'buttercup "This warning should be captured in
`collected-output'.")
- (expect (with-current-buffer "*Warnings*"
- (buffer-string))
- :to-match "This warning should be captured"))))
+ (let ((warning-text
+ (format "This warning, issued at %s should be sent to the
*Warnings* buffer as normal."
+ (current-time-string))))
+ (display-warning 'buttercup warning-text)
+ (expect (with-current-buffer "*Warnings*"
+ (buffer-string))
+ :to-match (regexp-quote warning-text))))))
```
- [nongnu] elpa/buttercup 929a904 143/340: Implement closure-based expect macro, (continued)
- [nongnu] elpa/buttercup 929a904 143/340: Implement closure-based expect macro, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 11d7fdc 148/340: Add "--help" option to buttercup command-line script, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4106adc 170/340: Add release script, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9b6cc79 177/340: travis: Test on 26.1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0d742b0 187/340: Set failure-description for pending specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1c50a80 196/340: Fix the buttercup-run tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 810fa6f 197/340: Bump version: 1.15 → 1.16, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4459f37 199/340: Add test for :var* argument, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ff16814 216/340: travis: Always test on xenial, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bd851d4 217/340: Merge pull request #155 from snogge/travis-xenial, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 246ddd7 218/340: Merge pull request #152 from DarwinAwardWinner/suppress-warning-redirect,
ELPA Syncer <=
- [nongnu] elpa/buttercup 9408a72 220/340: Merge pull request #154 from DarwinAwardWinner/test-emacs-26.3, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 26e2ded 222/340: Rename some innacurate references to "fake" functions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9b87afc 234/340: Merge branch 'snogge/spy-context-tweaks', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d8b596c 240/340: Merge branch 'doc-improve', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 243b71f 245/340: Merge branch 'spy-scope-error', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f3c2b00 261/340: test: Move with-local-buttercup to top of file, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0dbd474 263/340: Bump version: 1.20 → 1.21, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1c9c82f 265/340: Fixed misspelling in the documentation, ELPA Syncer, 2021/12/16
- [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