From 2337fa91913cefe6c272acfd1813173ae12b1df5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich=20M=C3=BCller?= Date: Fri, 21 Feb 2025 12:13:20 +0100 Subject: [PATCH] ; Don't fail image tests if jpeg is supported via imagemagick * test/lisp/image-tests.el (image-supported-file-p/optional): Consider also the imagemagick case. (Bug#76465) (cherry picked from commit 76b938fc1d24b9dcc0c50db1dc520fbdacc19a16) --- test/lisp/image-tests.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el index 03d20758052..455118cb98c 100644 --- a/test/lisp/image-tests.el +++ b/test/lisp/image-tests.el @@ -80,9 +80,12 @@ (should (eq (image-supported-file-p "foo.pbm") 'pbm))) (ert-deftest image-supported-file-p/optional () - (if (image-type-available-p 'jpeg) - (should (eq (image-supported-file-p "foo.jpg") 'jpeg)) - (should-not (image-supported-file-p "foo.jpg")))) + (cond ((image-type-available-p 'jpeg) + (should (eq (image-supported-file-p "foo.jpg") 'jpeg))) + ((fboundp 'imagemagick-types) + (should (eq (image-supported-file-p "foo.jpg") 'imagemagick))) + (nil + (should-not (image-supported-file-p "foo.jpg"))))) (ert-deftest image-supported-file-p/unsupported-returns-nil () (should-not (image-supported-file-p "foo.some-unsupported-format"))) -- 2.39.5