* pcase-tests.el: Add #18554 test case.
This commit is contained in:
parent
528872c5f8
commit
87eb617ac8
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,12 @@
|
|||
"Test pcase code."
|
||||
(should (equal (pcase '(1 . 2) ((app car '2) 6) ((app car '1) 5)) 5)))
|
||||
|
||||
(ert-deftest pcase-tests-bugs ()
|
||||
(should (equal (pcase '(2 . 3) ;bug#18554
|
||||
(`(,hd . ,(and (pred atom) tl)) (list hd tl))
|
||||
((pred consp) nil))
|
||||
'(2 3))))
|
||||
|
||||
(pcase-defmacro pcase-tests-plus (pat n)
|
||||
`(app (lambda (v) (- v ,n)) ,pat))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue