* 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
generalized boolean.
(open pathname
:if-does-not-exist
(if if-does-not-exist :error nil)
- :element-type '(unsigned-byte 8)))
- (if if-does-not-exist
- (error 'simple-file-error
- :pathname pathspec
- :format-control
- "~@<Couldn't load ~S: file does not exist.~@:>"
- :format-arguments (list pathspec))))))))
+ :element-type '(unsigned-byte 8))))))
+ (if if-does-not-exist
+ (error 'simple-file-error
+ :pathname pathspec
+ :format-control
+ "~@<Couldn't load ~S: file does not exist.~@:>"
+ :format-arguments (list pathspec)))))
(unless stream
(return-from load nil))
&key
(:verbose t)
(:print t)
- (:if-does-not-exist (member :error :create nil))
+ (:if-does-not-exist t)
(:external-format keyword))
t)
(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))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.17.25"
+"1.0.17.26"