From: Eli Zaretskii Date: Sat, 7 Aug 2021 11:29:45 +0000 (+0300) Subject: Fix files-tests broken on MS-Windows by a recent change X-Git-Tag: emacs-28.0.90~1591^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=85c8a9cd0cff0e2f6d5470423731d9f1e87e2cde;p=emacs.git Fix files-tests broken on MS-Windows by a recent change * test/lisp/files-tests.el (files-colon-path): Use path-separator, and account for drive letters in absolute file names on MS-Windows. (Bug#49918) --- diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 523f51e0194..a612c0617d3 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1462,9 +1462,11 @@ See ." '("x:/foo/bar/baz/"))) (should (equal (parse-colon-path "/foo//bar/baz") '("/foo/bar/baz/")))) - - (should (equal (parse-colon-path ".:/tmp") - '("./" "/tmp/")))) + (let* ((path (concat "." path-separator "/tmp")) + (parsed-path (parse-colon-path path)) + (name-start (if (memq system-type '(windows-nt ms-dos)) 2))) + (should (equal (car parsed-path) "./")) + (should (equal (substring (cadr parsed-path) name-start) "/tmp/")))) (ert-deftest files-test-magic-mode-alist-doctype () "Test that DOCTYPE and variants put files in mhtml-mode."