Commit 34e2da7c authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix #136: ensure-directories-exist should return the given pathspec

parent 44fcc4af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1478,4 +1478,4 @@ optionally keeping some of the most recent old versions."
			 (retry () :report "Try to create the directory again"
				(go retry))))))
	 ;; Only the first path in a search-list is considered.
	 (return (values pathname created-p))))))
	 (return (values pathspec created-p))))))
+3 −3
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@

(define-test unix-namestring.1.exists
  ;; Make sure the desired directories exist.
  (assert-equal #P"/tmp/foo/bar/hello.txt"
  (assert-equal "/tmp/foo/bar/hello.txt"
		(ensure-directories-exist "/tmp/foo/bar/hello.txt"))
  (dolist (path '("/tmp/hello.txt"
		  "/tmp/foo/"
@@ -27,7 +27,7 @@

(define-test unix-namestring.1.non-existent
  ;; Make sure the desired directories exist.
  (assert-equal #P"/tmp/foo/bar/hello.txt"
  (assert-equal "/tmp/foo/bar/hello.txt"
		(ensure-directories-exist "/tmp/foo/bar/hello.txt"))
  ;; These paths contain directories that don't exist.
  (dolist (path '("/tmp/oops/"
@@ -42,7 +42,7 @@

(define-test unix-namestring.2
  ;; Make sure the desired directories exist.
  (assert-equal #P"/tmp/foo/bar/hello.txt"
  (assert-equal "/tmp/foo/bar/hello.txt"
		(ensure-directories-exist "/tmp/foo/bar/hello.txt"))
  (unwind-protect
       (progn