diff --git a/impls/tests/step3_env.mal b/impls/tests/step3_env.mal index 1a84d442d4..5e77c4666f 100644 --- a/impls/tests/step3_env.mal +++ b/impls/tests/step3_env.mal @@ -14,6 +14,12 @@ x ;=>4 x ;=>4 +(def! x nil) +x +;=>nil +(def! x 5) +x +;=>5 (def! y (+ 1 7)) ;=>8 y @@ -44,7 +50,7 @@ w (let* (x 9) x) ;=>9 x -;=>4 +;=>5 (let* (z (+ 2 3)) (+ 1 z)) ;=>6 (let* (p (+ 2 3) q (+ 2 p)) (+ p q)) diff --git a/impls/tests/step4_if_fn_do.mal b/impls/tests/step4_if_fn_do.mal index b98f2dae2a..aeab17b3f1 100644 --- a/impls/tests/step4_if_fn_do.mal +++ b/impls/tests/step4_if_fn_do.mal @@ -202,6 +202,15 @@ (plus7 8) ;=>15 +;; Testing lexical function scope binds names (not values) +(def! a 12) +(def! fx (fn* () a)) +(fx) +;=>12 +(def! a 2000) +(fx) +;=>2000 + ;; Testing do form (do (prn 101)) ;/101