]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix dnd-tests on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Sun, 22 Sep 2024 09:57:08 +0000 (12:57 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Sep 2024 11:59:16 +0000 (13:59 +0200)
* 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

index 3d4f28b9ae146f8064e1bb29fdb0bb2bc879b127..3b1cf51069a070599ddbec959ca564f1b684acab 100644 (file)
@@ -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")))