aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorPaul Eggert2022-12-17 12:15:30 -0800
committerPaul Eggert2022-12-17 14:24:16 -0800
commitbef1edc9cacb976120dff73b4d7bbdce6ade982b (patch)
treedd1420a157c9ce01c4d7297a380b8e8dcb86cb09 /test/lisp
parent8a9579ca29df951ace35125873949e905fd1af2b (diff)
downloademacs-bef1edc9cacb976120dff73b4d7bbdce6ade982b.tar.gz
emacs-bef1edc9cacb976120dff73b4d7bbdce6ade982b.zip
make-directory now returns t if dir already exists
This new feature will help fix a copy-directory bug (Bug#58919). Its implementation does not rely on make-directory handlers supporting the new feature, as it no longer uses a make-directory handler H in any way other than (funcall H DIR), thus using only the intersection of the old and new behavior for handlers. This will give us time to fix handlers at our leisure. * lisp/files.el (files--ensure-directory): New arg MKDIR. All uses changed. (files--ensure-directory, make-directory): Return non-nil if DIR is already a directory. All uses changed. * test/lisp/files-tests.el (files-tests-make-directory): Test new return-value convention.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/files-tests.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index efafb5583ac..b9fbeb8a4e0 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -1261,11 +1261,11 @@ works as expected if the default directory is quoted."
1261 (a/b (concat dirname "a/b"))) 1261 (a/b (concat dirname "a/b")))
1262 (write-region "" nil file) 1262 (write-region "" nil file)
1263 (should-error (make-directory "/")) 1263 (should-error (make-directory "/"))
1264 (should-not (make-directory "/" t)) 1264 (should (make-directory "/" t))
1265 (should-error (make-directory dir)) 1265 (should-error (make-directory dir))
1266 (should-not (make-directory dir t)) 1266 (should (make-directory dir t))
1267 (should-error (make-directory dirname)) 1267 (should-error (make-directory dirname))
1268 (should-not (make-directory dirname t)) 1268 (should (make-directory dirname t))
1269 (should-error (make-directory file)) 1269 (should-error (make-directory file))
1270 (should-error (make-directory file t)) 1270 (should-error (make-directory file t))
1271 (should-not (make-directory subdir1)) 1271 (should-not (make-directory subdir1))