diff options
| author | Arun Isaac | 2026-06-24 03:39:14 +0100 |
|---|---|---|
| committer | Arun Isaac | 2026-06-24 03:39:14 +0100 |
| commit | ae745a38b80ff1756360fe5b4f1de86f92628a4f (patch) | |
| tree | 06becf3a0cc13fd4a7eaad76aa1562dbf4460d08 /tests | |
| parent | ef0905ab646d9999591efba7049b4a131f44742a (diff) | |
| download | ccwl-ae745a38b80ff1756360fe5b4f1de86f92628a4f.tar.gz ccwl-ae745a38b80ff1756360fe5b4f1de86f92628a4f.tar.lz ccwl-ae745a38b80ff1756360fe5b4f1de86f92628a4f.zip | |
utils: Drop support for #:allow-other-keys.
Drop support for #:allow-other-keys in lambda** and syntax-lambda**. We do not use #:allow-other-keys anywhere; simplify by dropping it. Modify behaviour with unknown keys thus: raise an &unrecognized-keyword-assertion, but continue evaluation as though #:allow-other-keys was specified.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/utils.scm | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/utils.scm b/tests/utils.scm index f3d9abd..7ca73b8 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -89,11 +89,13 @@ '(lambda** (#:key foo #:foo bar) foo)))) -(test-equal "Allow other keys in lambda**" +(test-equal "Allow other keys in lambda**, but raise an exception" 1 - ((lambda** (#:key foo #:allow-other-keys) - foo) - #:foo 1 #:bar 2)) + (with-exception-handler (const #t) + (lambda () + ((lambda** (#:key foo) + foo) + #:foo 1 #:bar 2)))) (test-assert "Unrecognized keyword argument passed to lambda** should raise an &unrecognized-keyword-assertion condition" (guard (exception @@ -138,11 +140,13 @@ ((syntax-lambda** (#:key* foo) foo))) -(test-equal "Allow other keys in syntax-lambda**" +(test-equal "Allow other keys in syntax-lambda**, but raise an exception" 1 - (syntax->datum ((syntax-lambda** (#:key foo #:allow-other-keys) - foo) - #'#:foo #'1 #'#:bar #'2))) + (syntax->datum (with-exception-handler (const #t) + (lambda () + ((syntax-lambda** (#:key foo) + foo) + #'#:foo #'1 #'#:bar #'2))))) (test-assert "syntax-lambda** should raise an &unrecognized-keyword-assertion on unrecognized keywords in arguments" (guard (exception |
