1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

; Fix dnd-tests on MS-Windows

* test/lisp/dnd-tests.el (dnd-tests-get-local-file-uri): Fix test
on MS-Windows.
This commit is contained in:
Eli Zaretskii 2024-09-22 12:57:08 +03:00
parent e8f0baf354
commit 3fb966dc63

View File

@ -389,11 +389,13 @@ This function only tries to handle strings."
(delete-file remote-temp-file)))) (delete-file remote-temp-file))))
(ert-deftest dnd-tests-get-local-file-uri () (ert-deftest dnd-tests-get-local-file-uri ()
(should (equal (dnd-get-local-file-uri "file://localhost/path/to/foo") ;; 'dnd-get-local-file-uri' always returns nil on MS-Windows
"file:///path/to/foo")) (unless (eq system-type 'windows-nt)
(should (equal (dnd-get-local-file-uri (should (equal (dnd-get-local-file-uri "file://localhost/path/to/foo")
(format "file://%s/path/to/" (system-name))) "file:///path/to/foo"))
"file:///path/to/")) (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://some-remote-host/path/to/foo"))
(should-not (dnd-get-local-file-uri "file:///path/to/foo"))) (should-not (dnd-get-local-file-uri "file:///path/to/foo")))