From 0ba94159aa848dd67ca13aac26e8c76016b54ae0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 22 Sep 2024 12:57:08 +0300 Subject: [PATCH] ; Fix dnd-tests on MS-Windows * test/lisp/dnd-tests.el (dnd-tests-get-local-file-uri): Fix test on MS-Windows. (cherry picked from commit 3fb966dc6392e1908304a1b6fe481da9f670cfbb) --- test/lisp/dnd-tests.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/lisp/dnd-tests.el b/test/lisp/dnd-tests.el index 3d4f28b9ae1..3b1cf51069a 100644 --- a/test/lisp/dnd-tests.el +++ b/test/lisp/dnd-tests.el @@ -389,11 +389,13 @@ This function only tries to handle strings." (delete-file remote-temp-file)))) (ert-deftest dnd-tests-get-local-file-uri () - (should (equal (dnd-get-local-file-uri "file://localhost/path/to/foo") - "file:///path/to/foo")) - (should (equal (dnd-get-local-file-uri - (format "file://%s/path/to/" (system-name))) - "file:///path/to/")) + ;; 'dnd-get-local-file-uri' always returns nil on MS-Windows + (unless (eq system-type 'windows-nt) + (should (equal (dnd-get-local-file-uri "file://localhost/path/to/foo") + "file:///path/to/foo")) + (should (equal (dnd-get-local-file-uri + (format "file://%s/path/to/" (system-name))) + "file:///path/to/"))) (should-not (dnd-get-local-file-uri "file://some-remote-host/path/to/foo")) (should-not (dnd-get-local-file-uri "file:///path/to/foo"))) -- 2.39.5