From 87eb617ac82d28a092a63958d29d4c616fdb43f7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 27 Sep 2014 00:27:14 -0400 Subject: [PATCH] * pcase-tests.el: Add #18554 test case. --- test/automated/pcase-tests.el | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- 2.39.5