From: Juanma Barranquero Date: Fri, 28 Jun 2019 13:22:00 +0000 (+0200) Subject: * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX filenames. X-Git-Tag: emacs-26.3~63 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bfc7c6e;p=emacs.git * test/lisp/url/url-file-tests.el (url-file): Fix for POSIX filenames. --- diff --git a/test/lisp/url/url-file-tests.el b/test/lisp/url/url-file-tests.el index 84b7c3a70b0..58e0250ba96 100644 --- a/test/lisp/url/url-file-tests.el +++ b/test/lisp/url/url-file-tests.el @@ -34,10 +34,11 @@ (ert-deftest url-file () "Test reading file via file:/// URL." - (let ((file (expand-file-name "file.txt" url-file-tests-data-directory))) + (let* ((file (expand-file-name "file.txt" url-file-tests-data-directory)) + (uri-prefix (if (eq (aref file 0) ?/) "file://" "file:///"))) (should (equal (with-current-buffer - (url-file (url-generic-parse-url (concat "file:///" file)) + (url-file (url-generic-parse-url (concat uri-prefix file)) #'ignore nil) (prog1 (buffer-substring (point) (point-max)) (kill-buffer)))