X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ffull-eval.impure.lisp;h=540e6de4561ef8a786b545ea4d5f034cecd130dd;hb=19319c931fc1636835dbef71808cc10e252bcf45;hp=b2eb21a7143c33200025a9c1c6baf995fa4764bd;hpb=b2ed34b667665e52609cf431c00179b136be450d;p=sbcl.git diff --git a/tests/full-eval.impure.lisp b/tests/full-eval.impure.lisp index b2eb21a..540e6de 100644 --- a/tests/full-eval.impure.lisp +++ b/tests/full-eval.impure.lisp @@ -86,3 +86,21 @@ (let ((sb-ext:*evaluator-mode* :compile)) (load *file*)))) (delete-file *file*) + +(defvar *stash*) +(defun save-it (f) (setq *stash* f) 'whatever) +(with-test (:name (let* :nested-environments)) + (let ((z 'zee) (y 'y) (x 92)) + (let* ((baz (save-it (lambda (what) (assert (equal (list what x y z) + (list what 92 'y 'zee)))))) + (mum (funcall *stash* :after-binding-baz)) + (y 'new-y) + (z (progn (funcall *stash* :after-binding-y) 'new-z)) + (x (progn (funcall *stash* :after-binding-z) 'new-x))) + (funcall *stash* :in-body) + (values)))) + +(with-test (:name (let* :nested-environment-again)) + (let* ((foo 3) + (foo (lambda () (typep foo 'integer)))) + (assert (funcall foo))))