Skip to content
Snippets Groups Projects
Commit b59185fc authored by Raymond Toy's avatar Raymond Toy
Browse files

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

parent 9c0f63ff
No related branches found
No related tags found
No related merge requests found
...@@ -1478,4 +1478,4 @@ optionally keeping some of the most recent old versions." ...@@ -1478,4 +1478,4 @@ optionally keeping some of the most recent old versions."
(retry () :report "Try to create the directory again" (retry () :report "Try to create the directory again"
(go retry)))))) (go retry))))))
;; Only the first path in a search-list is considered. ;; Only the first path in a search-list is considered.
(return (values pathname created-p)))))) (return (values pathspec created-p))))))
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
(define-test unix-namestring.1.exists (define-test unix-namestring.1.exists
;; Make sure the desired directories exist. ;; 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")) (ensure-directories-exist "/tmp/foo/bar/hello.txt"))
(dolist (path '("/tmp/hello.txt" (dolist (path '("/tmp/hello.txt"
"/tmp/foo/" "/tmp/foo/"
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
(define-test unix-namestring.1.non-existent (define-test unix-namestring.1.non-existent
;; Make sure the desired directories exist. ;; 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")) (ensure-directories-exist "/tmp/foo/bar/hello.txt"))
;; These paths contain directories that don't exist. ;; These paths contain directories that don't exist.
(dolist (path '("/tmp/oops/" (dolist (path '("/tmp/oops/"
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
(define-test unix-namestring.2 (define-test unix-namestring.2
;; Make sure the desired directories exist. ;; 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")) (ensure-directories-exist "/tmp/foo/bar/hello.txt"))
(unwind-protect (unwind-protect
(progn (progn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment