0.8.13.42:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 9 Aug 2004 13:13:53 +0000 (13:13 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 9 Aug 2004 13:13:53 +0000 (13:13 +0000)
Fix for "~V%" NIL (and countless other similar examples from
ansi-tests)

NEWS
src/code/target-format.lisp
tests/print.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 2ac5f55..0afb90d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,9 @@ changes in sbcl-0.8.14 relative to sbcl-0.8.13:
     to approximately the same size (using Euclid's algorithm) before
     applying the more sophisticated binary GCD.  (thanks to Juho
     Snellman)
+  * fixed some bugs revealed by Paul Dietz' test suite:
+    ** format variable parameters ("~V<char>") are defaulted properly
+       if the corresponding argument is NIL.
 
 changes in sbcl-0.8.13 relative to sbcl-0.8.12:
   * new feature: SB-PACKAGE-LOCKS. See the "Package Locks" section of
index 99cbb3f..5e959fd 100644 (file)
                                  (offset (car param-and-offset))
                                  (param (cdr param-and-offset)))
                             (case param
-                              (:arg (next-arg offset))
+                              (:arg (or (next-arg offset) ,default))
                               (:remaining (length args))
                               ((nil) ,default)
                               (t param)))))))
index 9a3a2c3..4fd0a67 100644 (file)
                  (write #2a((t t) (nil nil)) :stream s))))
     (assert (equalp (read-from-string output) #2a((t t) (nil nil))))))
 
+;;; NIL parameters to "interpreted" FORMAT directives
+(assert (string= (format nil "~v%" nil) (string #\Newline)))
+
 ;;; success
 (quit :unix-status 104)
index 1a12e2c..065bba6 100644 (file)
@@ -17,4 +17,4 @@
 ;;; 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".)
-"0.8.13.41"
+"0.8.13.42"