* pcase-tests.el: Add #18554 test case.

This commit is contained in:
Stefan Monnier 2014-09-27 00:27:14 -04:00
parent 528872c5f8
commit 87eb617ac8

View file

@ -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))