summaryrefslogtreecommitdiff
path: root/test/lisp/image-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/image-tests.el')
-rw-r--r--test/lisp/image-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el
index 89b926e629d..621646e5750 100644
--- a/test/lisp/image-tests.el
+++ b/test/lisp/image-tests.el
@@ -22,6 +22,10 @@
(require 'ert)
(require 'image)
+(defconst image-tests--emacs-images-directory
+ (expand-file-name "../etc/images" (getenv "EMACS_TEST_DIRECTORY"))
+ "Directory containing Emacs images.")
+
(ert-deftest image--set-property ()
"Test `image--set-property' behavior."
(let ((image (list 'image)))
@@ -42,4 +46,11 @@
(setf (image-property image :width) nil)
(should (equal image '(image)))))
+(ert-deftest image-type-from-file-header-test ()
+ "Test image-type-from-file-header."
+ (should (eq 'svg
+ (image-type-from-file-header
+ (expand-file-name "splash.svg"
+ image-tests--emacs-images-directory)))))
+
;;; image-tests.el ends here