summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/pcase-tests.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-03-01 14:07:05 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-03-01 14:07:05 -0500
commitd56b1f9e7cee077011fa1256c2965c2984a17282 (patch)
treef80affdaff93047277f1b597e0f7311b2fce6ca9 /test/lisp/emacs-lisp/pcase-tests.el
parenta0f60293d97cda858c033db4ae074e5e5560aab2 (diff)
downloademacs-d56b1f9e7cee077011fa1256c2965c2984a17282.tar.gz
* lisp/emacs-lisp/pcase.el (pcase--split-pred): Re-fix bug#14773
Adjust to calling convention of `macroexp--fgrep`.
Diffstat (limited to 'test/lisp/emacs-lisp/pcase-tests.el')
-rw-r--r--test/lisp/emacs-lisp/pcase-tests.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/pcase-tests.el b/test/lisp/emacs-lisp/pcase-tests.el
index e6f4c097504..14384112b34 100644
--- a/test/lisp/emacs-lisp/pcase-tests.el
+++ b/test/lisp/emacs-lisp/pcase-tests.el
@@ -75,6 +75,14 @@
(ert-deftest pcase-tests-vectors ()
(should (equal (pcase [1 2] (`[,x] 1) (`[,x ,y] (+ x y))) 3)))
+(ert-deftest pcase-tests-bug14773 ()
+ (let ((f (lambda (x)
+ (pcase 'dummy
+ ((and (let var x) (guard var)) 'left)
+ ((and (let var (not x)) (guard var)) 'right)))))
+ (should (equal (funcall f t) 'left))
+ (should (equal (funcall f nil) 'right))))
+
;; Local Variables:
;; no-byte-compile: t
;; End: