X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fload.impure.lisp;h=a739006c52849f2c4176f29d2b9edf0b9902a314;hb=3f47602cbbfdb31c59252008b5f2dbe91ca43d7f;hp=7466edb54f715e83987626ad9cafaa646d823854;hpb=53f576d7d796e37a9c51c3c3296341458f046c44;p=sbcl.git diff --git a/tests/load.impure.lisp b/tests/load.impure.lisp index 7466edb..a739006 100644 --- a/tests/load.impure.lisp +++ b/tests/load.impure.lisp @@ -287,4 +287,21 @@ (stimulate-sbcl) (stimulate-sbcl))) - +(defun load-empty-file (type) + (let ((pathname (make-pathname :name "load-impure-lisp-empty-temp" + :type type))) + (unwind-protect + (progn + (with-open-file (f pathname + :if-exists :supersede + :direction :output)) + (handler-case + (progn (load pathname) t) + (error () nil))) + (ignore-errors (delete-file pathname))))) + +(with-test (:name (load "empty.lisp")) + (assert (load-empty-file "lisp"))) + +(with-test (:name (load "empty.fasl")) + (assert (not (load-empty-file "fasl"))))