From aa9cba658768aba4da1b74ffb33d9962ffff5756 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 25 Jul 2021 08:00:50 +0200 Subject: Allow empty elements in directory-append * doc/lispref/files.texi (Directory Names): Document it. * src/fileio.c (Fdirectory_append): Allow empty elements. --- test/src/fileio-tests.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/src') 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." (aset string 2 255) (should (not (multibyte-string-p string))) (should (equal (directory-append "fóo" string) "fóo/aa\377aa"))) - (should-error (directory-append "foo" "")) - (should-error (directory-append "" "bar")) - (should-error (directory-append "" ""))) + (should (equal (directory-append "foo") "foo")) + (should (equal (directory-append "foo/") "foo/")) + (should (equal (directory-append "foo" "") "foo")) + (should (equal (directory-append "foo" "" "" "" nil) "foo")) + (should (equal (directory-append "" "bar") "bar")) + (should (equal (directory-append "" "") ""))) ;;; fileio-tests.el ends here -- cgit v1.2.1