From 4263db57f1747f222d45a78767d17f0a3df54e57 Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Sun, 14 Jan 2024 13:10:28 +0100 Subject: [PATCH] add unit tests for closures in dynamic scope --- tests/dynamic.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/dynamic.scm b/tests/dynamic.scm index ce43b41bc..a33fd5af9 100644 --- a/tests/dynamic.scm +++ b/tests/dynamic.scm @@ -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