diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-25 08:00:50 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-25 08:00:50 +0200 |
commit | aa9cba658768aba4da1b74ffb33d9962ffff5756 (patch) | |
tree | 39d07450a850e5b46687f18c367e64e723cbb7a3 /test/src/fileio-tests.el | |
parent | 03f844249cb15a8380d09041a537803c933a2769 (diff) | |
download | emacs-aa9cba658768aba4da1b74ffb33d9962ffff5756.tar.gz emacs-aa9cba658768aba4da1b74ffb33d9962ffff5756.tar.bz2 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/fileio-tests.el')
-rw-r--r-- | test/src/fileio-tests.el | 9 |
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." (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 |