aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-07-25 08:00:50 +0200
committerLars Ingebrigtsen2021-07-25 08:00:50 +0200
commitaa9cba658768aba4da1b74ffb33d9962ffff5756 (patch)
tree39d07450a850e5b46687f18c367e64e723cbb7a3 /test/src
parent03f844249cb15a8380d09041a537803c933a2769 (diff)
downloademacs-aa9cba658768aba4da1b74ffb33d9962ffff5756.tar.gz
emacs-aa9cba658768aba4da1b74ffb33d9962ffff5756.zip
Allow empty elements in directory-append
* doc/lispref/files.texi (Directory Names): Document it. * src/fileio.c (Fdirectory_append): Allow empty elements.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/fileio-tests.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el
index 73a7775279a..b1288f943e3 100644
--- a/test/src/fileio-tests.el
+++ b/test/src/fileio-tests.el
@@ -175,8 +175,11 @@ Also check that an encoding error can appear in a symlink."
175 (aset string 2 255) 175 (aset string 2 255)
176 (should (not (multibyte-string-p string))) 176 (should (not (multibyte-string-p string)))
177 (should (equal (directory-append "fóo" string) "fóo/aa\377aa"))) 177 (should (equal (directory-append "fóo" string) "fóo/aa\377aa")))
178 (should-error (directory-append "foo" "")) 178 (should (equal (directory-append "foo") "foo"))
179 (should-error (directory-append "" "bar")) 179 (should (equal (directory-append "foo/") "foo/"))
180 (should-error (directory-append "" ""))) 180 (should (equal (directory-append "foo" "") "foo"))
181 (should (equal (directory-append "foo" "" "" "" nil) "foo"))
182 (should (equal (directory-append "" "bar") "bar"))
183 (should (equal (directory-append "" "") "")))
181 184
182;;; fileio-tests.el ends here 185;;; fileio-tests.el ends here