X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ffull-eval.impure.lisp;h=540e6de4561ef8a786b545ea4d5f034cecd130dd;hb=19319c931fc1636835dbef71808cc10e252bcf45;hp=032634f189adc7a43e141714105f372073244751;hpb=d2b9d8bbd2d1489723a4437e64f607585670ed58;p=sbcl.git diff --git a/tests/full-eval.impure.lisp b/tests/full-eval.impure.lisp index 032634f..540e6de 100644 --- a/tests/full-eval.impure.lisp +++ b/tests/full-eval.impure.lisp @@ -12,7 +12,7 @@ ;;;; more information. #-sb-eval -(sb-ext:quit :unix-status 104) +(sb-ext:exit :code 104) (setf sb-ext:*evaluator-mode* :interpret) @@ -74,3 +74,33 @@ (declare (enable-package-locks cl:ed)) (cl:ed))) 42))))) + +(defvar *file* #p"full-eval-temp.lisp") +(with-test (:name (:full-eval :redefinition-warnings)) + (with-open-file (stream *file* :direction :output :if-exists :supersede) + (write '(defun function-for-redefinition () nil) :stream stream)) + (handler-bind ((warning #'error)) + (let ((sb-ext:*evaluator-mode* :interpret)) + (load *file*) + (load *file*)) + (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))))