]> git.eshelyaron.com Git - emacs.git/commitdiff
* pcase-tests.el: Add #18554 test case.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Sep 2014 04:27:14 +0000 (00:27 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 27 Sep 2014 04:27:14 +0000 (00:27 -0400)
test/automated/pcase-tests.el

index ec0c3bc7fd5bbf1b802444155efe6fde4c60c6ca..f5ecadf72a2262f65d72a28f66f3b3fe678d5616 100644 (file)
   "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))