summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-07-03 12:17:21 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-07-03 12:17:21 -0700
commit1b704d697cd8135fef278c1a7c330ac11a667388 (patch)
treee82bc3a134ab4f8f61af85a6b47534e4c1a576fe
parentdb1bf07b053a057b25cd4be683d6e2b017f9856f (diff)
downloadtxr-1b704d697cd8135fef278c1a7c330ac11a667388.tar.gz
txr-1b704d697cd8135fef278c1a7c330ac11a667388.tar.bz2
txr-1b704d697cd8135fef278c1a7c330ac11a667388.zip
compiler: add failing inline lambda tests.
* tests/012/lambda.tl: Add tests where apply list supplies : values to optional params, which must trigger defaulting.
-rw-r--r--tests/012/lambda.tl10
1 files changed, 10 insertions, 0 deletions
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)