summaryrefslogtreecommitdiff
path: root/test/src/image-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/image-tests.el')
-rw-r--r--test/src/image-tests.el23
1 files changed, 21 insertions, 2 deletions
diff --git a/test/src/image-tests.el b/test/src/image-tests.el
index d5e3a7cc5ca..b921739a056 100644
--- a/test/src/image-tests.el
+++ b/test/src/image-tests.el
@@ -44,6 +44,8 @@
(tiff . ,(expand-file-name
"nextstep/GNUstep/Emacs.base/Resources/emacs.tiff"
source-directory))
+ (webp . ,(expand-file-name "test/data/image/black.webp"
+ source-directory))
(xbm . ,(find-image '((:file "gnus/gnus.xbm" :type xbm))))
(xpm . ,(find-image '((:file "splash.xpm" :type xpm))))
;; TODO: gif
@@ -86,6 +88,13 @@
(should (floatp a))
(should (floatp b)))))
+(ert-deftest image-tests-image-size/webp ()
+ (image-skip-unless 'webp)
+ (pcase (image-size (create-image (cdr (assq 'webp image-tests--files))))
+ (`(,a . ,b)
+ (should (floatp a))
+ (should (floatp b)))))
+
(ert-deftest image-tests-image-size/xbm ()
(image-skip-unless 'xbm)
(pcase (image-size (cdr (assq 'xbm image-tests--files)))
@@ -130,7 +139,12 @@
(ert-deftest image-tests-image-mask-p/tiff ()
(image-skip-unless 'tiff)
(should-not (image-mask-p (create-image
- (cdr (assq 'tiff image-tests--files))))))
+ (cdr (assq 'tiff image-tests--files))))))
+
+(ert-deftest image-tests-image-mask-p/webp ()
+ (image-skip-unless 'webp)
+ (should-not (image-mask-p (create-image
+ (cdr (assq 'webp image-tests--files))))))
(ert-deftest image-tests-image-mask-p/xbm ()
(image-skip-unless 'xbm)
@@ -173,7 +187,12 @@
(ert-deftest image-tests-image-metadata/tiff ()
(image-skip-unless 'tiff)
(should-not (image-metadata
- (create-image (cdr (assq 'tiff image-tests--files))))))
+ (create-image (cdr (assq 'tiff image-tests--files))))))
+
+(ert-deftest image-tests-image-metadata/webp ()
+ (image-skip-unless 'webp)
+ (should-not (image-metadata
+ (create-image (cdr (assq 'webp image-tests--files))))))
(ert-deftest image-tests-image-metadata/xbm ()
(image-skip-unless 'xbm)