summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-08 06:59:16 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-08 06:59:16 -0800
commitde6ced80888ed410aa96729879921b5dc5066a51 (patch)
tree31d81493d291ec449c6b021f65f3e7b000650d6c
parent7d34bf0f489009caed4a2958ea8c05adbf692145 (diff)
downloadtxr-de6ced80888ed410aa96729879921b5dc5066a51.tar.gz
txr-de6ced80888ed410aa96729879921b5dc5066a51.tar.bz2
txr-de6ced80888ed410aa96729879921b5dc5066a51.zip
matcher: test for dotted variable in predicate.
* tests/011/patmatch.tl: New test case.
-rw-r--r--tests/011/patmatch.tl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl
index 8c8aae59..a616b9d2 100644
--- a/tests/011/patmatch.tl
+++ b/tests/011/patmatch.tl
@@ -90,6 +90,10 @@
(test (when-match @(@d (chr-digit @c)) #\5 (list d c)) (5 #\5))
(test (when-match @(or @(require @a (oddp a)) @b @c) 2 (list a b c))
(nil 2 nil))
+(test (when-match @(@x (< . @sym)) '(1 2 3) (list x sym))
+ (t (1 2 3)))
+(test (when-match @(@x (< . @sym)) '(3 2 1) (list x sym))
+ nil)
(test (if-match (@(or @a) @a) '(1 2) a :no) :no)
(test (if-match (@(and @a) @a) '(1 2) a :no) :no)