X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fload.impure.lisp;h=7466edb54f715e83987626ad9cafaa646d823854;hb=9837343101c3da7b3a8f94609ec116ec5025436a;hp=461c2383382faaabbb5527f990d55bc2cf7d0ce4;hpb=435658ed85eeb9b7aa3a409464e54ee0763c6ba1;p=sbcl.git diff --git a/tests/load.impure.lisp b/tests/load.impure.lisp index 461c238..7466edb 100644 --- a/tests/load.impure.lisp +++ b/tests/load.impure.lisp @@ -271,3 +271,20 @@ (when (find-restart 'sb-fasl::object) (invoke-restart 'sb-fasl::object))))) (load-and-assert spec fasl fasl)))) + +(with-test (:name :bug-332) + (flet ((stimulate-sbcl () + (let ((filename (format nil "/tmp/~A.lisp" (gensym)))) + ;; create a file which redefines a structure incompatibly + (with-open-file (f filename :direction :output :if-exists :supersede) + (print '(defstruct bug-332 foo) f) + (print '(defstruct bug-332 foo bar) f)) + ;; compile and load the file, then invoke the continue restart on + ;; the structure redefinition error + (handler-bind ((error (lambda (c) (continue c)))) + (load (compile-file filename)))))) + (stimulate-sbcl) + (stimulate-sbcl) + (stimulate-sbcl))) + +