Skip to content

Commit

Permalink
add unit tests for closures in dynamic scope
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 14, 2024
1 parent 0e4cffd commit 4263db5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/dynamic.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
(f))))
20)))

(test "dynamic: no closures"
(lambda (t)
(t.is (exec (begin
(define f (let ((x 10))
(lambda () x)))
(try (t) (catch (e) #t))))
#t)))

(test "dynamic: function parameters"
(lambda (t)
(t.is (exec (begin
Expand Down

0 comments on commit 4263db5

Please sign in to comment.