diff options
| author | Lars Ingebrigtsen | 2021-07-24 17:22:43 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-24 17:22:43 +0200 |
| commit | b4543dfa9e72deeee607ffa9396a680c51a00968 (patch) | |
| tree | 09493193d03f4961a8007c709f1b8a8598ac26d6 /test/src | |
| parent | 8cd66a3170b4117d3cbcdce7a09837e3c2ea0e43 (diff) | |
| download | emacs-b4543dfa9e72deeee607ffa9396a680c51a00968.tar.gz emacs-b4543dfa9e72deeee607ffa9396a680c51a00968.zip | |
Extend directory-append to take an arbitrary number of components
* doc/lispref/files.texi (Directory Names): Document it.
* lisp/emacs-lisp/shortdoc.el (file-name): Add new example.
* src/fileio.c (Fdirectory_append): Change the function to take an
arbitrary number of components.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/fileio-tests.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index 80afeae41ba..702659fa395 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -162,10 +162,16 @@ Also check that an encoding error can appear in a symlink." | |||
| 162 | 162 | ||
| 163 | (ert-deftest fileio-tests/directory-append () | 163 | (ert-deftest fileio-tests/directory-append () |
| 164 | (should (equal (directory-append "foo" "bar") "foo/bar")) | 164 | (should (equal (directory-append "foo" "bar") "foo/bar")) |
| 165 | (should (equal (directory-append "foo" "bar") "foo/bar")) | ||
| 166 | (should (equal (directory-append "foo" "bar" "zot") "foo/bar/zot")) | ||
| 165 | (should (equal (directory-append "foo/" "bar") "foo/bar")) | 167 | (should (equal (directory-append "foo/" "bar") "foo/bar")) |
| 166 | (should (equal (directory-append "foo//" "bar") "foo//bar")) | 168 | (should (equal (directory-append "foo//" "bar") "foo//bar")) |
| 169 | (should (equal (directory-append "foo/" "bar/" "zot") "foo/bar/zot")) | ||
| 170 | (should (equal (directory-append "fóo" "bar") "fóo/bar")) | ||
| 171 | (should (equal (directory-append "foo" "bár") "foo/bár")) | ||
| 172 | (should (equal (directory-append "fóo" "bár") "fóo/bár")) | ||
| 167 | (should-error (directory-append "foo" "")) | 173 | (should-error (directory-append "foo" "")) |
| 168 | (should (equal (directory-append "" "bar") "bar")) | 174 | (should-error (directory-append "" "bar")) |
| 169 | (should-error (directory-append "" ""))) | 175 | (should-error (directory-append "" ""))) |
| 170 | 176 | ||
| 171 | ;;; fileio-tests.el ends here | 177 | ;;; fileio-tests.el ends here |