; 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)
This commit is contained in:
Ulrich Müller 2025-02-21 12:13:20 +01:00
parent f8ff9592be
commit 76b938fc1d

View file

@ -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")))