1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00

Fix problem with non-absolute names

* lisp/files.el (file-name-split): Fix problem with non-absolute
names.
This commit is contained in:
Lars Ingebrigtsen 2021-11-11 13:20:34 +01:00
parent bf9364a56e
commit d75558f11c
2 changed files with 2 additions and 2 deletions

View file

@ -1806,7 +1806,7 @@ Prompt users for any modified buffer with `buffer-offer-save' non-nil."
;; `save-some-buffers-default-predicate' (i.e. the 2nd element) is ignored.
(nil save-some-buffers-root ,nb-might-save))))))
(defun test-file-name-split ()
(ert-deftest test-file-name-split ()
(should (equal (file-name-split "foo/bar") '("foo" "bar")))
(should (equal (file-name-split "/foo/bar") '("" "foo" "bar")))
(should (equal (file-name-split "/foo/bar/zot") '("" "foo" "bar" "zot")))