[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 897d0e7 155/340: Remove some warnings on test-bu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 897d0e7 155/340: Remove some warnings on test-buttercup.el |
Date: |
Thu, 16 Dec 2021 14:59:24 -0500 (EST) |
branch: elpa/buttercup
commit 897d0e709cd2ff0e0641244cdc31e204a863af0c
Author: Damien Cassou <damien@cassou.me>
Commit: Jorgen Schäfer <Jorgen.Schaefer@gmail.com>
Remove some warnings on test-buttercup.el
---
tests/test-buttercup.el | 100 ++++++++++++++++++++++++++----------------------
1 file changed, 55 insertions(+), 45 deletions(-)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index 6c867f7..54df118 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -15,6 +15,12 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;; Commentary:
+;;
+;; Define test-suites to test buttercup itself. This test suite
+;; should pass for all Emacs versions defined in the .travis.yml file
+;; in the project directory root.
+
;;; Code:
(require 'buttercup)
@@ -23,7 +29,7 @@
(require 'cl-lib)
(defun make-list-of-closures (items)
- "For each element of ITEMS, return a closure that returns it."
+ "For each element of ITEMS, return a closure returning it."
(mapcar (lambda (item)
(lambda () item))
items))
@@ -277,7 +283,7 @@
"su1 su2"))))
(describe "The `buttercup-spec-full-name' function"
- (let (su1 su2 sp1)
+ (let (su1 su2 sp1 sp2)
(before-each
(setq su1 (make-buttercup-suite :description "su1")
su2 (make-buttercup-suite :description "su2")
@@ -372,7 +378,7 @@
(it "should add a spec to the current suite"
(let ((buttercup--current-suite (make-buttercup-suite)))
(buttercup-it "the test spec"
- (lambda () 23))
+ (lambda () 23))
(let ((spec (car (buttercup-suite-children buttercup--current-suite))))
(expect (buttercup-spec-description spec)
:to-equal
@@ -461,7 +467,7 @@
(it "should be a no-op"
(expect (buttercup-xdescribe
"bla bla"
- (lambda () (error "should not happen")))
+ (lambda () (error "Should not happen")))
:not :to-throw))
(it "should add a pending suite"
@@ -489,13 +495,13 @@
(let ((buttercup--current-suite (make-buttercup-suite)))
(buttercup-xit
"bla bla"
- (lambda () (error "should not happen")))))
+ (lambda () (error "Should not happen")))))
:not :to-throw)
(it "should add a function that raises a pending signal"
(let ((buttercup--current-suite (make-buttercup-suite)))
(buttercup-xit "bla bla" (lambda ()
- (error "should not happen")))
+ (error "Should not happen")))
(expect (funcall
(buttercup-spec-function
(car (buttercup-suite-children buttercup--current-suite))))
@@ -709,45 +715,45 @@
:to-equal
23))
- (it "works with strings"
- (spy-on 'test-function :and-return-value "return value")
- (expect (test-function 2 3)
- :to-equal
- "return value"))
-
- (it "works with vectors"
- (spy-on 'test-function :and-return-value [1 2 3 4])
- (expect (test-function 2 3)
- :to-equal
- [1 2 3 4]))
-
- (it "works with symbols"
- (spy-on 'test-function :and-return-value 'symbol)
- (expect (test-function 2 3)
- :to-equal
- 'symbol))
-
- (it "works with conses"
- (spy-on 'test-function :and-return-value '(1 . 2))
- (expect (test-function 2 3)
- :to-equal
- (cons 1 2)))
-
- (it "works with lists"
- (spy-on 'test-function :and-return-value '(1 2 3))
- (expect (test-function 2 3)
- :to-equal
- '(1 2 3)))
-
- (it "works with alists"
- (spy-on 'test-function :and-return-value '((first . 1)
-
(second . 2)
-
(third . 3)))
- (expect (test-function 2 3)
- :to-equal
- '((first . 1)
- (second . 2)
- (third . 3)))))
+ (it "works with strings"
+ (spy-on 'test-function :and-return-value "return value")
+ (expect (test-function 2 3)
+ :to-equal
+ "return value"))
+
+ (it "works with vectors"
+ (spy-on 'test-function :and-return-value [1 2 3 4])
+ (expect (test-function 2 3)
+ :to-equal
+ [1 2 3 4]))
+
+ (it "works with symbols"
+ (spy-on 'test-function :and-return-value 'symbol)
+ (expect (test-function 2 3)
+ :to-equal
+ 'symbol))
+
+ (it "works with conses"
+ (spy-on 'test-function :and-return-value '(1 . 2))
+ (expect (test-function 2 3)
+ :to-equal
+ (cons 1 2)))
+
+ (it "works with lists"
+ (spy-on 'test-function :and-return-value '(1 2 3))
+ (expect (test-function 2 3)
+ :to-equal
+ '(1 2 3)))
+
+ (it "works with alists"
+ (spy-on 'test-function :and-return-value '((first . 1)
+ (second . 2)
+ (third . 3)))
+ (expect (test-function 2 3)
+ :to-equal
+ '((first . 1)
+ (second . 2)
+ (third . 3)))))
(describe ":and-call-fake keyword functionality"
(before-each
@@ -953,3 +959,7 @@
(expect specs :to-be-truthy)
(expect (length (cdr specs)) :to-equal 1)
(expect (cl-caadr specs) :to-equal "should fontify special
keywords")))))
+
+(provide 'test-buttercup)
+
+;;; test-buttercup.el ends here
- [nongnu] elpa/buttercup 0c1dcda 161/340: Fix docstring of buttercup--specs-and-suite, (continued)
- [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
- [nongnu] elpa/buttercup 6c11d8e 097/340: Debian and Ubuntu installation instructions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ae606fc 153/340: Set failure description to empty string for pending specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 34e12fd 154/340: Get rid of 60 compile-time warnings out of 97, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 897d0e7 155/340: Remove some warnings on test-buttercup.el,
ELPA Syncer <=
- [nongnu] elpa/buttercup 25046d3 160/340: Rewrite buttercup--update-with-funcall with suite-or-spec functions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 85aebcd 168/340: Fix issue #121, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4089d5f 194/340: Bump version: 1.14 → 1.15, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1850253 195/340: Remove duplicate buttercup-color declaration, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2bc55fe 201/340: Add emacs-26.2 to CI config, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup debe7cc 204/340: Merge pull request #144 from kevinjfoley/support-var-star, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c2d75e9 209/340: Bump version: 1.17 → 1.18, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bb3fba3 227/340: Properly handle return values and thrown signals in spies, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a970d10 228/340: Implement spy-calls-count-returned and spy-calls-count-errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8d91893 232/340: Optimize spy-calls-count-errors and spy-calls-count-returned, ELPA Syncer, 2021/12/16