Skip to content

Commit

Permalink
add unit tests #360
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 2, 2024
1 parent f7e0f74 commit 9558f56
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1626,3 +1626,17 @@
(begin (lambda () (throw 'ZONK))))
(awhen (assoc 'bar alist) "msg"))
"msg")))

(test "syntax: improper pattern"
(lambda (t)
(define-syntax f
(syntax-rules ()
((f a ... x . y)
(let ((output (vector)))
(begin
(begin
(output.push (list a x y))) ...)
output))))

(t.is (f 10 20 30 'a 'b)
#((10 b ()) (20 b ()) (30 b ()) (a b ())))))

0 comments on commit 9558f56

Please sign in to comment.