From: Mattias EngdegÄrd Date: Thu, 6 May 2021 13:15:55 +0000 (+0200) Subject: Don't fail image-tests if JPEG format isn't compiled in X-Git-Tag: emacs-28.0.90~2587 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c3d029c923fa7492196d73669f860790184e48a0;p=emacs.git 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). --- diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el index 2f7afa2f38e..317e85fe50c 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."