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