diff options
author | Arun Isaac | 2021-07-20 16:58:48 +0530 |
---|---|---|
committer | Arun Isaac | 2021-07-20 16:58:48 +0530 |
commit | cdedc54e7c51755103d78014e8a8773d82110c63 (patch) | |
tree | e4e53789892a34e5d70f7ae242b8743e51c3b21e /tests | |
parent | 54d5ce4ecdc414c74afd3cf2b37fbebb82c3cc81 (diff) | |
download | ccwl-cdedc54e7c51755103d78014e8a8773d82110c63.tar.gz ccwl-cdedc54e7c51755103d78014e8a8773d82110c63.tar.lz ccwl-cdedc54e7c51755103d78014e8a8773d82110c63.zip |
ccwl: Set default value of lambda** n-ary arguments to '().
* ccwl/utils.scm (lambda**): Set default value of lambda** n-ary
arguments to the empty list. Document this in the docstring.
* tests/utils.scm ("default value of lambda** unary argument should be
#f", "default value of lambda** n-ary argument should be the empty
list"): New tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/utils.scm b/tests/utils.scm index 5c5bfd1..bc9315d 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -70,6 +70,16 @@ (list foo aal vale pal naal irandu sol)) 1 2 #:vale 123 #:naal 321 456)) +(test-equal "default value of lambda** unary argument should be #f" + #f + ((lambda** (#:key foo) + foo))) + +(test-equal "default value of lambda** n-ary argument should be the empty list" + '() + ((lambda** (#:key* foo) + foo))) + (test-assert "syntax-lambda**" (equal? (list #'1 #'2 #'123 (list #'1 #'2 #'3)) ((syntax-lambda** (a b #:key foo #:key* bar) |