diff options
| author | Ulrich Müller | 2025-02-21 12:13:20 +0100 |
|---|---|---|
| committer | Ulrich Müller | 2025-02-21 13:02:58 +0100 |
| commit | 76b938fc1d24b9dcc0c50db1dc520fbdacc19a16 (patch) | |
| tree | ecded03867a198eba32805bf3440ca1c52094357 | |
| parent | f8ff9592be9181465740ee98b71513cdbcafc35f (diff) | |
| download | emacs-76b938fc1d24b9dcc0c50db1dc520fbdacc19a16.tar.gz emacs-76b938fc1d24b9dcc0c50db1dc520fbdacc19a16.zip | |
; Don't fail image tests if jpeg is supported via imagemagick
* test/lisp/image-tests.el (image-supported-file-p/optional):
Consider also the imagemagick case. (Bug#76465)
| -rw-r--r-- | test/lisp/image-tests.el | 9 |
1 files changed, 6 insertions, 3 deletions
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 @@ | |||
| 80 | (should (eq (image-supported-file-p "foo.pbm") 'pbm))) | 80 | (should (eq (image-supported-file-p "foo.pbm") 'pbm))) |
| 81 | 81 | ||
| 82 | (ert-deftest image-supported-file-p/optional () | 82 | (ert-deftest image-supported-file-p/optional () |
| 83 | (if (image-type-available-p 'jpeg) | 83 | (cond ((image-type-available-p 'jpeg) |
| 84 | (should (eq (image-supported-file-p "foo.jpg") 'jpeg)) | 84 | (should (eq (image-supported-file-p "foo.jpg") 'jpeg))) |
| 85 | (should-not (image-supported-file-p "foo.jpg")))) | 85 | ((fboundp 'imagemagick-types) |
| 86 | (should (eq (image-supported-file-p "foo.jpg") 'imagemagick))) | ||
| 87 | (nil | ||
| 88 | (should-not (image-supported-file-p "foo.jpg"))))) | ||
| 86 | 89 | ||
| 87 | (ert-deftest image-supported-file-p/unsupported-returns-nil () | 90 | (ert-deftest image-supported-file-p/unsupported-returns-nil () |
| 88 | (should-not (image-supported-file-p "foo.some-unsupported-format"))) | 91 | (should-not (image-supported-file-p "foo.some-unsupported-format"))) |