0.8.7.23:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 27 Jan 2004 12:02:43 +0000 (12:02 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 27 Jan 2004 12:02:43 +0000 (12:02 +0000)
Fix some OPEN tests
... :DIRECTION :IO didn't work if the file didn't exist, despite
default being :CREATE
... adjust filesys test to cope with new disallowed
:WILD-INFERIORS :UP
... we still fail some OPEN tests in PFD's suite: some are because
of not supporting (unsigned-byte 33) streams, while the
rest are because DIRECTORY is broken on logical pathnames,
*sigh*

NEWS
contrib/sb-simple-streams/internal.lisp
src/code/fd-stream.lisp
tests/filesys.test.sh
tests/stream.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index ea7f17a..9ac0efe 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2283,6 +2283,8 @@ changes in sbcl-0.8.8 relative to sbcl-0.8.7:
     ** Attempting to use standardized file system operators with a
        pathname with invalid :DIRECTORY components signals a
        FILE-ERROR.
+    ** OPEN :DIRECTION :IO no longer fails to work on non-existent
+       files.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index f8afe67..e5e926e 100644 (file)
     (declare (type sb-int:index mask))
     (let ((name (cond ((sb-int:unix-namestring pathname input))
                      ((and input (eq if-does-not-exist :create))
+                      (sb-int:unix-namestring pathname nil))
+                     ((and (eq direction :io) (not if-does-not-exist-given))
                       (sb-int:unix-namestring pathname nil)))))
       ;; Process if-exists argument if we are doing any output.
       (cond (output
index 2dee43a..3c2f286 100644 (file)
           (namestring
            (cond ((unix-namestring pathname input))
                  ((and input (eq if-does-not-exist :create))
+                  (unix-namestring pathname nil))
+                 ((and (eq direction :io) (not if-does-not-exist-given))
                   (unix-namestring pathname nil)))))
       ;; Process if-exists argument if we are doing any output.
       (cond (output
index 3580d86..4d78f7d 100644 (file)
@@ -177,11 +177,13 @@ Lisp filename syntax idiosyncrasies)."
     (need-match "animal/vertebrate/**/*.*" vertebrates)
     (need-match "animal/vertebrate/mammal/../**/*.*" vertebrates)
     (need-match "animal/vertebrate/mammal/../**/**/*.*" vertebrates)
+    #+nil
     (need-match "animal/vertebrate/mammal/mythical/../**/../**/*.*"
                vertebrates))
   (need-match "animal/vertebrate/**/robot.*" nil)
   (need-match "animal/vertebrate/mammal/../**/*.robot" nil)
   (need-match "animal/vertebrate/mammal/../**/robot/*.*" nil)
+  #+nil
   (need-match "animal/vertebrate/mammal/robot/../**/../**/*.*" nil))
 (need-matches)
 (sb-ext:quit :unix-status 52)
index 71a7a8c..9b671c5 100644 (file)
   (with-open-file (s p)
     (assert (string= (read-line s) "THESE INSERTMBOLS")))
   (delete-file p))
+\f
+;;; :DIRECTION :IO didn't work on non-existent pathnames
+(let ((p "direction-io-test"))
+  (ignore-errors (delete-file p))
+  (with-open-file (s p :direction :io)
+    (format s "1")
+    (finish-output s)
+    (file-position s :start)
+    (assert (char= (read-char s) #\1)))
+  (delete-file p))
+\f
 ;;; success
 (quit :unix-status 104)
index 9b5b5f3..2b76a5d 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.7.22"
+"0.8.7.23"