diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-27 07:00:44 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-27 07:00:44 -0800 |
commit | d4acfa584a4e65150ca98cd5bac462999b49b166 (patch) | |
tree | 4edc2ae1a81e18e9f78249b92bfe7e6dd6e8ef98 | |
parent | 9b880e894c7f74a114bd1d5bc094d5e241b83a74 (diff) | |
download | txr-d4acfa584a4e65150ca98cd5bac462999b49b166.tar.gz txr-d4acfa584a4e65150ca98cd5bac462999b49b166.tar.bz2 txr-d4acfa584a4e65150ca98cd5bac462999b49b166.zip |
matcher: add failing @(all (@or ...)) test.
The matcher has a bug: the loop patterns are not collecting
the variables from enclosed parallel patterns.
-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 784588ad..f2b98445 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -70,6 +70,9 @@ (list x y z)) (1 2 3)) +(test (when-match @(all @(or (@x @y) @z)) '((1 2) (3 4)) (list x y z)) + ((1 3) (2 4) (nil nil))) + (test (if-match @(or (@x 3 3) (1 @x 3) (1 2 @x)) '(1 2 3) x) 2) (test (if-match @(op <= 10 @1 13) 11 :yes :no) :yes) (test (when-match @(let x @(op <= 10 @1 13)) 11 x) 11) |