diff options
| author | Lars Ingebrigtsen | 2021-07-25 08:54:20 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-25 08:54:20 +0200 |
| commit | f04f8126f016b43c45d432bf353ba2a0ac8f7d96 (patch) | |
| tree | 796343397718cd3e340637d505eb2fb6e1dce1d0 /test/src | |
| parent | aa9cba658768aba4da1b74ffb33d9962ffff5756 (diff) | |
| download | emacs-f04f8126f016b43c45d432bf353ba2a0ac8f7d96.tar.gz emacs-f04f8126f016b43c45d432bf353ba2a0ac8f7d96.zip | |
Rename directory-append to file-name-concat
* src/fileio.c (Ffile_name_concat):
* lisp/files.el (move-file-to-trash):
* lisp/emacs-lisp/shortdoc.el (file-name):
* doc/lispref/files.texi (Directory Names): Rename
`directory-append' to `file-name-concat'.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/fileio-tests.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index b1288f943e3..f4d123b4261 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -160,26 +160,26 @@ Also check that an encoding error can appear in a symlink." | |||
| 160 | (should-error (file-exists-p "/foo\0bar") | 160 | (should-error (file-exists-p "/foo\0bar") |
| 161 | :type 'wrong-type-argument)) | 161 | :type 'wrong-type-argument)) |
| 162 | 162 | ||
| 163 | (ert-deftest fileio-tests/directory-append () | 163 | (ert-deftest fileio-tests/file-name-concat () |
| 164 | (should (equal (directory-append "foo" "bar") "foo/bar")) | 164 | (should (equal (file-name-concat "foo" "bar") "foo/bar")) |
| 165 | (should (equal (directory-append "foo" "bar") "foo/bar")) | 165 | (should (equal (file-name-concat "foo" "bar") "foo/bar")) |
| 166 | (should (equal (directory-append "foo" "bar" "zot") "foo/bar/zot")) | 166 | (should (equal (file-name-concat "foo" "bar" "zot") "foo/bar/zot")) |
| 167 | (should (equal (directory-append "foo/" "bar") "foo/bar")) | 167 | (should (equal (file-name-concat "foo/" "bar") "foo/bar")) |
| 168 | (should (equal (directory-append "foo//" "bar") "foo//bar")) | 168 | (should (equal (file-name-concat "foo//" "bar") "foo//bar")) |
| 169 | (should (equal (directory-append "foo/" "bar/" "zot") "foo/bar/zot")) | 169 | (should (equal (file-name-concat "foo/" "bar/" "zot") "foo/bar/zot")) |
| 170 | (should (equal (directory-append "fóo" "bar") "fóo/bar")) | 170 | (should (equal (file-name-concat "fóo" "bar") "fóo/bar")) |
| 171 | (should (equal (directory-append "foo" "bár") "foo/bár")) | 171 | (should (equal (file-name-concat "foo" "bár") "foo/bár")) |
| 172 | (should (equal (directory-append "fóo" "bár") "fóo/bár")) | 172 | (should (equal (file-name-concat "fóo" "bár") "fóo/bár")) |
| 173 | (let ((string (make-string 5 ?a))) | 173 | (let ((string (make-string 5 ?a))) |
| 174 | (should (not (multibyte-string-p string))) | 174 | (should (not (multibyte-string-p string))) |
| 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 (file-name-concat "fóo" string) "fóo/aa\377aa"))) |
| 178 | (should (equal (directory-append "foo") "foo")) | 178 | (should (equal (file-name-concat "foo") "foo")) |
| 179 | (should (equal (directory-append "foo/") "foo/")) | 179 | (should (equal (file-name-concat "foo/") "foo/")) |
| 180 | (should (equal (directory-append "foo" "") "foo")) | 180 | (should (equal (file-name-concat "foo" "") "foo")) |
| 181 | (should (equal (directory-append "foo" "" "" "" nil) "foo")) | 181 | (should (equal (file-name-concat "foo" "" "" "" nil) "foo")) |
| 182 | (should (equal (directory-append "" "bar") "bar")) | 182 | (should (equal (file-name-concat "" "bar") "bar")) |
| 183 | (should (equal (directory-append "" "") ""))) | 183 | (should (equal (file-name-concat "" "") ""))) |
| 184 | 184 | ||
| 185 | ;;; fileio-tests.el ends here | 185 | ;;; fileio-tests.el ends here |