From: Stefan Monnier Date: Sat, 27 Sep 2014 04:27:14 +0000 (-0400) Subject: * pcase-tests.el: Add #18554 test case. X-Git-Tag: emacs-25.0.90~2635^2~679^2~208 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87eb617ac82d28a092a63958d29d4c616fdb43f7;p=emacs.git * pcase-tests.el: Add #18554 test case. --- diff --git a/test/automated/pcase-tests.el b/test/automated/pcase-tests.el index ec0c3bc7fd5..f5ecadf72a2 100644 --- a/test/automated/pcase-tests.el +++ b/test/automated/pcase-tests.el @@ -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))