summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/rx-tests.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-05-19 22:02:06 +0900
committerYuuki Harano <masm+github@masm11.me>2021-05-19 22:02:06 +0900
commite48372f8e5722643e37185b004469acd174663f7 (patch)
treeb77ec71bb51856f98d34182eca56322750533017 /test/lisp/emacs-lisp/rx-tests.el
parentd0fa569b7303c2d893b54d0a7af7a521308a5ed4 (diff)
parent61291e06cc804de2075305c220d31ef6072f28c8 (diff)
downloademacs-e48372f8e5722643e37185b004469acd174663f7.tar.gz
emacs-e48372f8e5722643e37185b004469acd174663f7.tar.bz2
emacs-e48372f8e5722643e37185b004469acd174663f7.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/emacs-lisp/rx-tests.el')
-rw-r--r--test/lisp/emacs-lisp/rx-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 2dd1bca22d1..4828df0de92 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -166,6 +166,20 @@
(backref 1))
(list u v)))
'("1" "3")))
+ (should (equal (pcase "bz"
+ ((rx "a" (let x nonl)) (list 1 x))
+ (_ 'no))
+ 'no))
+ (should (equal (pcase "az"
+ ((rx "a" (let x nonl)) (list 1 x))
+ ((rx "b" (let x nonl)) (list 2 x))
+ (_ 'no))
+ '(1 "z")))
+ (should (equal (pcase "bz"
+ ((rx "a" (let x nonl)) (list 1 x))
+ ((rx "b" (let x nonl)) (list 2 x))
+ (_ 'no))
+ '(2 "z")))
(let ((k "blue"))
(should (equal (pcase "<blue>"
((rx "<" (literal k) ">") 'ok))