From 4a03ee8d1fde18336c288ee48241e786c7330f09 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 1 Feb 2021 21:31:53 -0800 Subject: 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. --- tests/011/patmatch.tl | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3