From: Richard M Kreuter <kreuter@us...> - 2008-06-04 18:50:31
Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11985/tests
18.104.22.168: Fix regression in LOAD
* Between 1.0.16 and 1.0.17 LOAD began to return NIL when the argument
had a non-NIL type and didn't name a file. Fixed with tests.
* Additionally, writing the tests exposed an odd type restriction:
LOAD's IF-DOES-NOT-EXIST argument was declared as having type
(MEMBER :ERROR :CREATE NIL), but the CLHS just says it's a
RCS file: /cvsroot/sbcl/sbcl/tests/load.pure.lisp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- load.pure.lisp 14 Jul 2005 16:30:44 -0000 1.2
+++ load.pure.lisp 4 Jun 2008 18:50:27 -0000 1.3
@@ -20,3 +20,8 @@
(load "i-am-not.lisp" :if-does-not-exist nil)
(load "i-am-not.fasl" :if-does-not-exist nil)
(load "i-am-not.misc-garbage" :if-does-not-exist nil)
+;;; In 1.0.17, LOAD didn't error when the file didn't exist and
+;;; IF-DOES-NOT-EXIST was true.
+(assert (typep (nth-value 1 (ignore-errors (load "i-am-not"))) 'file-error))
+(assert (typep (nth-value 1 (ignore-errors (load "i-am-not" :if-does-not-exist t))) 'file-error))
Get latest updates about Open Source Projects, Conferences and News.