* test/lisp/url/url-file-tests.el (url-file): Fix for POSIX filenames.
This commit is contained in:
parent
13b95e1cc7
commit
bfc7c6e0d3
1 changed files with 3 additions and 2 deletions
|
@ -34,10 +34,11 @@
|
||||||
|
|
||||||
(ert-deftest url-file ()
|
(ert-deftest url-file ()
|
||||||
"Test reading file via file:/// URL."
|
"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
|
(should (equal
|
||||||
(with-current-buffer
|
(with-current-buffer
|
||||||
(url-file (url-generic-parse-url (concat "file:///" file))
|
(url-file (url-generic-parse-url (concat uri-prefix file))
|
||||||
#'ignore nil)
|
#'ignore nil)
|
||||||
(prog1 (buffer-substring (point) (point-max))
|
(prog1 (buffer-substring (point) (point-max))
|
||||||
(kill-buffer)))
|
(kill-buffer)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue