diff options
author | Eli Zaretskii <eliz@gnu.org> | 2022-08-24 19:19:33 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2022-08-24 19:19:33 +0300 |
commit | 95b1eacd4750da7329380aabcb383a8f9d96a59b (patch) | |
tree | 1ee5aef4ce7372df0232118057a2388ce213d0e2 /test/lisp/files-tests.el | |
parent | 3835255a38dc8c2a37c063fdcb7f3486094893e9 (diff) | |
download | emacs-95b1eacd4750da7329380aabcb383a8f9d96a59b.tar.gz |
Fix handling of UNCs in 'parse-colon-path
* lisp/files.el (parse-colon-path): Don't remove the second
leading slash on systems that support UNCs. (Bug#57353)
* test/lisp/files-tests.el (files-tests-bug-21454): Update
expected results.
(files-colon-path): Add a new test pattern.
Diffstat (limited to 'test/lisp/files-tests.el')
-rw-r--r-- | test/lisp/files-tests.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 54ada088003..20c712226ed 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -221,8 +221,8 @@ form.") ("x:/foo//bar/" "y:/bar/qux/" "z:/qux/foo/")) ("x:/foo/bar" "$FOO/baz/;z:/qux/foo/" ("x:/foo/bar/baz/" "z:/qux/foo/")) - ("//foo/bar/" "$FOO/baz/;/qux/foo/" - ("/foo/bar//baz/" "/qux/foo/"))) + ("///foo/bar/" "$FOO/baz/;/qux/foo/" + ("//foo/bar//baz/" "/qux/foo/"))) '(("/foo/bar//baz/:/bar/foo/baz//" nil ("/foo/bar//baz/" "/bar/foo/baz//")) ("/foo/bar/:/bar/qux/:/qux/foo" nil @@ -1504,7 +1504,11 @@ See <https://debbugs.gnu.org/36401>." (should (equal (parse-colon-path "/foo//bar/baz") '("/foo//bar/baz/")))) (should (equal (parse-colon-path (concat "." path-separator "/tmp")) - '("./" "/tmp/")))) + '("./" "/tmp/"))) + (should (equal (parse-colon-path (concat "/foo" path-separator "///bar")) + (if (memq system-type '(windows-nt cygwin ms-dos)) + '("/foo/" "//bar/") + '("/foo/" "/bar/"))))) (ert-deftest files-test-magic-mode-alist-doctype () "Test that DOCTYPE and variants put files in mhtml-mode." |