aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/files-tests.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index a2f2b74312f..b52965a02b4 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -344,6 +344,27 @@ be invoked with the right arguments."
344 (cdr path-res) 344 (cdr path-res)
345 (insert-directory-wildcard-in-dir-p (car path-res))))))) 345 (insert-directory-wildcard-in-dir-p (car path-res)))))))
346 346
347(ert-deftest files-tests--make-directory ()
348 (let* ((dir (make-temp-file "files-mkdir-test" t))
349 (dirname (file-name-as-directory dir))
350 (file (concat dirname "file"))
351 (subdir1 (concat dirname "subdir1"))
352 (subdir2 (concat dirname "subdir2"))
353 (a/b (concat dirname "a/b")))
354 (write-region "" nil file)
355 (should-error (make-directory "/"))
356 (should-not (make-directory "/" t))
357 (should-error (make-directory dir))
358 (should-not (make-directory dir t))
359 (should-error (make-directory dirname))
360 (should-not (make-directory dirname t))
361 (should-error (make-directory file))
362 (should-error (make-directory file t))
363 (should-not (make-directory subdir1))
364 (should-not (make-directory subdir2 t))
365 (should-error (make-directory a/b))
366 (should-not (make-directory a/b t))))
367
347 368
348(provide 'files-tests) 369(provide 'files-tests)
349;;; files-tests.el ends here 370;;; files-tests.el ends here