]> git.eshelyaron.com Git - emacs.git/commitdiff
; Skip image type test if support is missing
authorUlrich Müller <ulm@gentoo.org>
Fri, 21 Feb 2025 08:58:16 +0000 (09:58 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:06:31 +0000 (09:06 +0100)
* test/lisp/image-tests.el (image-type-from-file-name): Skip if
image types are not available.  (Bug#76462)

(cherry picked from commit cc51bd569874cd89a7fa1c3241033e69a5c2dd01)

test/lisp/image-tests.el

index 69557c836570cd20dd583eb91837694623f722be..03d207580520328f9950fda16ce11de2aeeccd46 100644 (file)
@@ -88,6 +88,9 @@
   (should-not (image-supported-file-p "foo.some-unsupported-format")))
 
 (ert-deftest image-type-from-file-name ()
+  (skip-unless (and (image-type-available-p 'jpeg)
+                    (image-type-available-p 'png)
+                    (image-type-available-p 'webp)))
   (with-suppressed-warnings ((obsolete image-type-from-file-name))
     (should (eq (image-type-from-file-name "foo.jpg") 'jpeg))
     (should (eq (image-type-from-file-name "foo.png") 'png))