[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup d00c164 083/340: Display description for pending
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup d00c164 083/340: Display description for pending specs |
Date: |
Thu, 16 Dec 2021 14:59:08 -0500 (EST) |
branch: elpa/buttercup
commit d00c1642a664f57d4a7d257a9f0edf6ba7e84b2c
Author: Jorgen Schaefer <contact@jorgenschaefer.de>
Commit: Jorgen Schaefer <contact@jorgenschaefer.de>
Display description for pending specs
There are various reasons why a spec might be pending. With the
support for skipping specs from the command line, there are now at
least two: Marked as pending, or skipped. This change enables
buttercup to display the reason for why a test was not run.
Users can now use this functionality to signal buttercup-pending
with an argument to show why something was skipped.
Fixes #22
---
buttercup.el | 14 +++++++-------
tests/test-buttercup.el | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/buttercup.el b/buttercup.el
index 6e23e4f..90c074e 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -360,7 +360,7 @@ form.")
(if body
`(buttercup-it ,description (lambda () ,@body))
`(buttercup-it ,description (lambda ()
- (signal 'buttercup-pending t)))))
+ (signal 'buttercup-pending "PENDING")))))
(defun buttercup-it (description body-function)
"Function to handle an `it' form."
@@ -433,7 +433,7 @@ A disabled suite is not run."
A disabled suite is not run."
(buttercup-describe description (lambda ()
- (signal 'buttercup-pending t))))
+ (signal 'buttercup-pending "PENDING"))))
;;;;;;;;;;;;;;;;;;;;;;
;;; Pending Specs: xit
@@ -450,7 +450,7 @@ A disabled spec is not run."
A disabled spec is not run."
(buttercup-it description (lambda ()
- (signal 'buttercup-pending t))))
+ (signal 'buttercup-pending "PENDING"))))
;;;;;;;;;
;;; Spies
@@ -665,7 +665,7 @@ current directory."
(when (string-match p (buttercup-spec-full-name (car
suites-or-specs)))
(throw 'return t)))
(setf (buttercup-spec-function (car suites-or-specs))
- (lambda () (signal 'buttercup-pending t))))))
+ (lambda () (signal 'buttercup-pending "SKIPPED"))))))
(setq suites-or-specs (cdr suites-or-specs)))))
(buttercup-run)))
@@ -743,9 +743,9 @@ Do not change the global value.")
(pcase description
(`(error (buttercup-failed . ,failure-description))
(setq description failure-description))
- (`(error (buttercup-pending . t))
+ (`(error (buttercup-pending . ,pending-description))
(setq status 'pending
- description "Pending"))))
+ description pending-description))))
(cond
((buttercup-suite-p suite-or-spec)
(when (eq (buttercup-suite-status suite-or-spec) 'passed)
@@ -833,7 +833,7 @@ Calls either `buttercup-reporter-batch' or
(append buttercup-reporter-batch--failures
(list arg))))
((eq (buttercup-spec-status arg) 'pending)
- (buttercup--print " PENDING\n"))
+ (buttercup--print " %s\n" (buttercup-spec-failure-description arg)))
(t
(error "Unknown spec status %s" (buttercup-spec-status arg)))))
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 7d90b08..ec8d037 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -317,7 +317,7 @@
(expect (macroexpand '(it "description"))
:to-equal
'(buttercup-it "description"
- (lambda () (signal 'buttercup-pending t))))))
+ (lambda () (signal 'buttercup-pending
"PENDING"))))))
(describe "The `buttercup-it' function"
(it "should fail if not called from within a describe form"
- [nongnu] elpa/buttercup cc52444 107/340: feature/windows-bin-support: support for windows, (continued)
- [nongnu] elpa/buttercup cc52444 107/340: feature/windows-bin-support: support for windows, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 3ef90b4 100/340: :to-match: Don't switch t/nil!, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ab2a558 111/340: Add projectile integration info to Readme, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0124cc4 129/340: Signal an error when ":to-throw" is used on a non-function (#97), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 31e765b 142/340: Do not suppress errors while loading test files, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bc13b53 183/340: Merge pull request #133 from snogge/fix-specs-in-pending-suites, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ca3ba8e 185/340: Merge pull request #130 from snogge/travis-update, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d6cf530 072/340: Clean up the interactive reporter., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 68c5ef5 076/340: Only load .el files during discovery., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 14718c0 081/340: Use the new Travis infrastructure, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d00c164 083/340: Display description for pending specs,
ELPA Syncer <=
- [nongnu] elpa/buttercup ad901b5 149/340: Do not modify global match data in matchers, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c1187b3 152/340: Extract function buttercup-suites-total-spces-status, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f565eda 157/340: Extract super-struct buttercup-suite-or-spec, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0c1dcda 161/340: Fix docstring of buttercup--specs-and-suite, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8d27bb9 169/340: Bump version: 1.10 → 1.11, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 45f40c7 174/340: Restore obsoletion version for buttercup-*-parents, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d7ab592 080/340: Bump version: 1.1 → 1.2, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e1f71ac 086/340: Bump version: 1.3 → 1.4, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 673f84d 087/340: Add assume form to cancel tests if conditions fail, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2aa840c 088/340: Merge pull request #40 from lunaryorn/assume-form, ELPA Syncer, 2021/12/16