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 | f1c6f3a88f2588e1ffa54a6bee1606b464699d02 (patch) | |
tree | 66c413d7853afdeb4f7c332163b5ea9aa3487974 | |
parent | 8045eeaa27eb9009ce03607032f2b1beada1e4bd (diff) | |
download | txr-f1c6f3a88f2588e1ffa54a6bee1606b464699d02.tar.gz txr-f1c6f3a88f2588e1ffa54a6bee1606b464699d02.tar.bz2 txr-f1c6f3a88f2588e1ffa54a6bee1606b464699d02.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) |