mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-07 15:21:46 +00:00
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.
This commit is contained in:
parent
8d81a4728d
commit
9667ba25b4
@ -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)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user