GNU bug report logs - #76462
30.1; Test failure in image-type-from-file-name

Previous Next

Package: emacs;

Reported by: Ulrich Müller <ulm <at> gentoo.org>

Date: Fri, 21 Feb 2025 08:10:02 UTC

Severity: normal

Fixed in version 30.1

Done: Ulrich Müller <ulm <at> gentoo.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ulrich Müller <ulm <at> gentoo.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Ulrich Müller <ulm <at> gentoo.org>, 76462 <at> debbugs.gnu.org
Subject: bug#76462: 30.1; Test failure in image-type-from-file-name
Date: Fri, 21 Feb 2025 10:08:24 +0100
[Message part 1 (text/plain, inline)]
>>>>> On Fri, 21 Feb 2025, Eli Zaretskii wrote:

> I cannot reproduce this, FWIW.

AFAICS this is triggered by either the --without-jpeg or --without-png
configure option.

Attached patch fixes the problem for me.

[0001-Skip-image-type-test-if-support-is-missing.patch (text/plain, inline)]
From aba28057375113ea15710ac4a38a1be7dc37b9b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm <at> gentoo.org>
Date: Fri, 21 Feb 2025 09:58:16 +0100
Subject: [PATCH] ; Skip image type test if support is missing

* test/lisp/image-tests.el (image-type-from-file-name): Skip if
image types are not available.  (Bug#76462)
---
 test/lisp/image-tests.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el
index 69557c83657..03d20758052 100644
--- a/test/lisp/image-tests.el
+++ b/test/lisp/image-tests.el
@@ -88,6 +88,9 @@ image-supported-file-p/unsupported-returns-nil
   (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))
-- 
2.48.1


This bug report was last modified 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.