* The native-namestring should be same for :DIRECTORY (:RELATIVE) and
NIL.
(type (pathname-type pathname)))
(coerce
(with-output-to-string (s)
- (ecase (car directory)
- (:absolute (write-char #\/ s))
- (:relative))
+ (when directory
+ (ecase (car directory)
+ (:absolute (write-char #\/ s))
+ (:relative)))
(dolist (piece (cdr directory))
(typecase piece
((member :up) (write-string ".." s))
(p2 (make-pathname :directory '(:relative :back "foo"))))
(assert (equal (merge-pathnames p1 p2)
(make-pathname :directory '(:relative :back "foo" "bar")))))
+
+;;; construct native namestrings even if the directory is empty (means
+;;; that same as if (:relative))
+(assert (equal (sb-ext:native-namestring (make-pathname :directory '(:relative)
+ :name "foo"
+ :type "txt"))
+ (sb-ext:native-namestring (let ((p (make-pathname :directory nil
+ :name "foo"
+ :type "txt")))
+ (assert (not (pathname-directory p)))
+ p))))
+
\f
;;;; success
;;; 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.9.13.30"
+"0.9.13.31"