From 775f634705e5d839404553c6c70e02b04b943d65 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Fri, 28 Jun 2024 10:40:05 -0700 Subject: [PATCH] ; Fix SHR test on MS-Windows * test/lisp/net/shr-tests.el (shr-test/zoom-image): Ensure the image URL is properly formatted: it should always have 3 slashes after "file:". (cherry picked from commit eaf2dc96c1f44fe8e07cf19614d7b73df9397ea0) --- test/lisp/net/shr-tests.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el index 4864fc488e2..54d85ee95f9 100644 --- a/test/lisp/net/shr-tests.el +++ b/test/lisp/net/shr-tests.el @@ -136,13 +136,15 @@ settings, then once more for each (OPTION . VALUE) pair.") (ert-deftest shr-test/zoom-image () "Test that `shr-zoom-image' properly replaces the original image." (skip-unless (bound-and-true-p image-types)) - (let ((image (expand-file-name "data/image/blank-100x200.png" - (getenv "EMACS_TEST_DIRECTORY")))) + (let* ((image (expand-file-name "data/image/blank-100x200.png" + (getenv "EMACS_TEST_DIRECTORY"))) + (image-url (concat "file://" (if (string-prefix-p "/" image) + image (concat "/" image))))) (dolist (alt '(nil "" "nothing to see here")) (with-temp-buffer (ert-info ((format "image with alt=%S" alt)) (let ((attrs (if alt (format " alt=\"%s\"" alt) ""))) - (insert (format "