[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master c3d029c 2/2: Don't fail image-tests if JPEG format isn't compiled
From: |
Mattias Engdegård |
Subject: |
master c3d029c 2/2: Don't fail image-tests if JPEG format isn't compiled in |
Date: |
Thu, 6 May 2021 09:54:52 -0400 (EDT) |
branch: master
commit c3d029c923fa7492196d73669f860790184e48a0
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Don't fail image-tests if JPEG format isn't compiled in
* test/lisp/image-tests.el (image-type/from-filename):
Make jpeg test conditional. Test pbm (always present).
---
test/lisp/image-tests.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el
index 2f7afa2..317e85f 100644
--- a/test/lisp/image-tests.el
+++ b/test/lisp/image-tests.el
@@ -59,7 +59,9 @@
(ert-deftest image-type/from-filename ()
;; On emba, `image-load-path' does not exist.
(skip-unless (bound-and-true-p image-load-path))
- (should (eq (image-type "foo.jpg") 'jpeg)))
+ (should (eq (image-type "gif.pbm") 'pbm))
+ (when (memq 'jpeg image-types) ; jpeg may not be compiled in
+ (should (eq (image-type "foo.jpg") 'jpeg))))
(ert-deftest image-type-from-file-header-test ()
"Test image-type-from-file-header."