From 85c8a9cd0cff0e2f6d5470423731d9f1e87e2cde Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 7 Aug 2021 14:29:45 +0300 Subject: [PATCH] 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) --- test/lisp/files-tests.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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." -- 2.39.2