summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/subr-x-tests.el
diff options
context:
space:
mode:
authorNicolas Petton <nicolas@petton.fr>2018-03-18 22:21:30 +0100
committerNicolas Petton <nicolas@petton.fr>2018-03-18 22:21:30 +0100
commit9667ba25b4af54179c28a719163c4b74f02d0ff8 (patch)
tree3134eff798e514caeb7f43175fd0c969bf1e89ea /test/lisp/emacs-lisp/subr-x-tests.el
parent8d81a4728df74f7f3f88b9efde7855965766dde8 (diff)
downloademacs-9667ba25b4af54179c28a719163c4b74f02d0ff8.tar.gz
emacs-9667ba25b4af54179c28a719163c4b74f02d0ff8.tar.bz2
emacs-9667ba25b4af54179c28a719163c4b74f02d0ff8.zip
Fix compilation warnings in subr-x-tests.el
* test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-if-let*-false) (subr-x-test-when-let*-false): Make tests simpler and compiler warning free.
Diffstat (limited to 'test/lisp/emacs-lisp/subr-x-tests.el')
-rw-r--r--test/lisp/emacs-lisp/subr-x-tests.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el b/test/lisp/emacs-lisp/subr-x-tests.el
index c9618f3c37f..f7f0ef384f6 100644
--- a/test/lisp/emacs-lisp/subr-x-tests.el
+++ b/test/lisp/emacs-lisp/subr-x-tests.el
@@ -148,34 +148,34 @@
"Test `if-let' with falsie bindings."
(should (equal
(if-let* ((a nil))
- (list a b c)
+ "yes"
"no")
"no"))
(should (equal
(if-let* ((a nil) (b 2) (c 3))
- (list a b c)
+ "yes"
"no")
"no"))
(should (equal
(if-let* ((a 1) (b nil) (c 3))
- (list a b c)
+ "yes"
"no")
"no"))
(should (equal
(if-let* ((a 1) (b 2) (c nil))
- (list a b c)
+ "yes"
"no")
"no"))
(should (equal
(let (z)
(if-let* (z (a 1) (b 2) (c 3))
- (list a b c)
+ "yes"
"no"))
"no"))
(should (equal
(let (d)
(if-let* ((a 1) (b 2) (c 3) d)
- (list a b c)
+ "yes"
"no"))
"no")))
@@ -312,34 +312,28 @@
"Test `when-let' with falsie bindings."
(should (equal
(when-let* ((a nil))
- (list a b c)
"no")
nil))
(should (equal
(when-let* ((a nil) (b 2) (c 3))
- (list a b c)
"no")
nil))
(should (equal
(when-let* ((a 1) (b nil) (c 3))
- (list a b c)
"no")
nil))
(should (equal
(when-let* ((a 1) (b 2) (c nil))
- (list a b c)
"no")
nil))
(should (equal
(let (z)
(when-let* (z (a 1) (b 2) (c 3))
- (list a b c)
"no"))
nil))
(should (equal
(let (d)
(when-let* ((a 1) (b 2) (c 3) d)
- (list a b c)
"no"))
nil)))