X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fload.impure.lisp;fp=tests%2Fload.impure.lisp;h=b54b3745c995f8284d1700a8f9b61eed0ed7548e;hb=e9840c3696d663a186df1a7e20d15b6caf4aec86;hp=0000000000000000000000000000000000000000;hpb=0e5a40455a1a3cc16cc71ad0f0b063eb4f1f2c3f;p=sbcl.git diff --git a/tests/load.impure.lisp b/tests/load.impure.lisp new file mode 100644 index 0000000..b54b374 --- /dev/null +++ b/tests/load.impure.lisp @@ -0,0 +1,35 @@ +;;;; miscellaneous side-effectful tests of LOAD + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +;;; Bug reported by Sean Ross: FASL loader set fill pointer to loaded +;;; simple arrays. +(defvar *array*) +(defvar *tmp-filename* "load-test.tmp") + +(progn + (with-open-file (s *tmp-filename* + :direction :output + :if-exists :supersede + :if-does-not-exist :create) + (print '(setq *array* #3a(((1 2) (2 1)) ((3 4) (4 3)))) s)) + (let (tmp-fasl) + (unwind-protect + (progn + (setq tmp-fasl (compile-file *tmp-filename*)) + (let ((*array* nil)) + (load tmp-fasl) + (assert (arrayp *array*)) + (assert (= (array-rank *array*) 3)) + (assert (not (array-has-fill-pointer-p *array*))))) + (when tmp-fasl (delete-file tmp-fasl)) + (delete-file *tmp-filename*))))