summaryrefslogtreecommitdiff
path: root/tests/utils.scm
AgeCommit message (Collapse)Author
2021-10-04ccwl: Support #:allow-other-keys in lambda** and syntax-lambda**.Arun Isaac
* ccwl/utils.scm (lambda**): Support #:allow-other-keys. Update docstring. (syntax-lambda**): Update docstring. * tests/utils.scm ("Allow other keys in lambda**", "Allow other keys in syntax-lambda**"): New tests.
2021-10-04ccwl: Error out on invalid keywords to lambda**.Arun Isaac
* ccwl/utils.scm (lambda**): Error out on invalid keywords (that is, keywords other than #:key, #:key* and #:allow-other-keys). * tests/utils.scm ("lambda** should error out on unrecognized keywords in arguments"): New test.
2021-10-04tests: Remove stray syntax-lambda** form.Arun Isaac
* tests/utils.scm: Remove stray syntax-lambda** form.
2021-07-27ccwl: Make syntax-lambda** more like lambda**.Arun Isaac
I have tripped up several times on the differences between lambda** and syntax-lambda**. No longer! Making syntax-lambda** as close as possible to lambda** makes the code much more readable and align better with common sense. * ccwl/utils.scm (syntax-lambda**): Do not ignore the first identifier. Accept multiple values as arguments, not a single syntax object. * ccwl/ccwl.scm (command): Update use of syntax-lambda**. * tests/utils.scm ("syntax-lambda**", "syntax-lambda** with default values"): Update tests.
2021-07-20ccwl: Set default value of lambda** n-ary arguments to '().Arun Isaac
* 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.
2021-07-20ccwl: Document syntax-lambda** support for default arguments.Arun Isaac
* ccwl/utils.scm (syntax-lambda**): Add example to docstring documenting support for default arguments. * tests/utils.scm ("syntax-lambda** with default values"): New test.
2021-07-20ccwl: Support default values for arguments in lambda**.Arun Isaac
* ccwl/utils.scm (lambda**): Support default values for arguments, both unary and n-ary. * tests/utils.scm ("lambda** with default values"): New test.
2021-07-20tests: Add tests for ccwl/utils.scm.Arun Isaac
* tests/utils.scm: New file. * Makefile.am (SCM_TESTS): Register it.