diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-27 22:39:32 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-27 22:39:32 -0800 |
commit | 2f033ba535929fd636c55a64a6ba8d048b256563 (patch) | |
tree | 6765795facb442862e1bf6b1d3dcea3165a46a53 /tests/011 | |
parent | 19a86d850a72ff2eda7801c8999a391d4308971a (diff) | |
download | txr-2f033ba535929fd636c55a64a6ba8d048b256563.tar.gz txr-2f033ba535929fd636c55a64a6ba8d048b256563.tar.bz2 txr-2f033ba535929fd636c55a64a6ba8d048b256563.zip |
mather: new bad (@(predicate) @(all ...)) test case.
* tests/011/patmatch.tl: Predicates must also be tested
earlier, as guard conditions.
Diffstat (limited to 'tests/011')
-rw-r--r-- | tests/011/patmatch.tl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/011/patmatch.tl b/tests/011/patmatch.tl index 60b28b63..30f57e4b 100644 --- a/tests/011/patmatch.tl +++ b/tests/011/patmatch.tl @@ -77,6 +77,8 @@ (test (when-match (foo @(all @x)) '(bar (1 2 . 3)) x) nil) +(test (when-match (@(oddp) @(all @x)) '(2 (1 2 . 3)) x) 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) |