From 1b704d697cd8135fef278c1a7c330ac11a667388 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 3 Jul 2021 12:17:21 -0700 Subject: compiler: add failing inline lambda tests. * tests/012/lambda.tl: Add tests where apply list supplies : values to optional params, which must trigger defaulting. --- tests/012/lambda.tl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/012/lambda.tl b/tests/012/lambda.tl index 2ddca48f..5267e4ef 100644 --- a/tests/012/lambda.tl +++ b/tests/012/lambda.tl @@ -87,6 +87,16 @@ [(lambda (x y : (a 3) (b 4)) (list x y a b)) . vl] (a b c d) [(lambda (x y : (a 3) (b 4)) (list x y a b)) 1 . vl] :error) +(defvarl vc '(: : : :)) + +(mtest + [(lambda (x y : (a 3) (b 4) . r) (list x y a b r)) . vc] (: : 3 4 nil) + [(lambda (x y : (a 3) (b 4) . r) (list x y a b r)) 1 . vc] (1 : 3 4 (:)) + [(lambda (x y : (a 3) (b 4) . r) (list x y a b r)) 1 2 . vc] (1 2 3 4 (: :)) + [(lambda (x y : (a 3) (b 4) . r) (list x y a b r)) 1 2 0 . vc] (1 2 0 4 (: : :)) + [(lambda (x y : (a 3) (b 4) . r) (list x y a b r)) 1 2 0 0 . vc] (1 2 0 0 (: : : :)) + [(lambda (x y : (a 3) (b 4) . r) (list x y a b r)) 1 2 0 0 5 . vc] (1 2 0 0 (5 : : : :))) + (cond (*compile-test* (exit t)) (t (set *compile-test* t) -- cgit v1.2.3