From de6ced80888ed410aa96729879921b5dc5066a51 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku <kaz@kylheku.com> Date: Mon, 8 Feb 2021 06:59:16 -0800 Subject: matcher: test for dotted variable in predicate. * tests/011/patmatch.tl: New test case. --- tests/011/patmatch.tl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/011/patmatch.tl') 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) -- cgit v1.2.3