From 2f033ba535929fd636c55a64a6ba8d048b256563 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 27 Jan 2021 22:39:32 -0800 Subject: mather: new bad (@(predicate) @(all ...)) test case. * tests/011/patmatch.tl: Predicates must also be tested earlier, as guard conditions. --- tests/011/patmatch.tl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/011') 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) -- cgit v1.2.3