diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-02-08 06:59:16 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-02-08 06:59:16 -0800 |
commit | de6ced80888ed410aa96729879921b5dc5066a51 (patch) | |
tree | 31d81493d291ec449c6b021f65f3e7b000650d6c /tests | |
parent | 7d34bf0f489009caed4a2958ea8c05adbf692145 (diff) | |
download | txr-de6ced80888ed410aa96729879921b5dc5066a51.tar.gz txr-de6ced80888ed410aa96729879921b5dc5066a51.tar.bz2 txr-de6ced80888ed410aa96729879921b5dc5066a51.zip |
matcher: test for dotted variable in predicate.
* tests/011/patmatch.tl: New test case.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/011/patmatch.tl | 4 |
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) |