diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-02-01 21:31:53 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-02-01 21:31:53 -0800 |
commit | 4a03ee8d1fde18336c288ee48241e786c7330f09 (patch) | |
tree | 66c413d7853afdeb4f7c332163b5ea9aa3487974 | |
parent | a2ebdf6228c7bee57ca9470477f09b2649501c2c (diff) | |
download | txr-4a03ee8d1fde18336c288ee48241e786c7330f09.tar.gz txr-4a03ee8d1fde18336c288ee48241e786c7330f09.tar.bz2 txr-4a03ee8d1fde18336c288ee48241e786c7330f09.zip |
matcher: adding test case for @(or) regression.
* tests/011/patmatch.tl: New test case showing that @(or)
no longer nulls out the variables from previous clauses like
it used to. (2 2 nil) is returned, showing a is not set to
nil when b matches.
-rw-r--r-- | tests/011/patmatch.tl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl index 347af4eb..f5f658ab 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -87,6 +87,9 @@ (test (when-match @(let x @(op <= 10 @1 13)) 11 x) 11) (test (when-match (@(evenp) @(oddp x)) '(2 3) x) 3) +(test (when-match @(or @(require @a (oddp a)) @b @c) 2 (list a b c)) + (nil 2 nil)) + (test (collect-each ((obj (list '(1 2 3) '(4 5) |