aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Kangas2021-10-23 06:49:09 +0200
committerStefan Kangas2021-10-23 08:31:03 +0200
commitad7fd3cb47fbc8406504a13e8e4d64f650b514ce (patch)
treedfe11bc01508a2ed7103b1014b36503d2f20d29c /test
parentbb06d5648eac297e5574b15c7723903c8c922d03 (diff)
downloademacs-ad7fd3cb47fbc8406504a13e8e4d64f650b514ce.tar.gz
emacs-ad7fd3cb47fbc8406504a13e8e4d64f650b514ce.zip
Partially remove exiftool dependency from image-dired.el
* lisp/image-dired.el (exif): Require. (image-dired-cmd-read-exif-data-program) (image-dired-cmd-read-exif-data-options) (image-dired-get-exif-data): Make obsolete in favour of using exif.el. This removes a dependency on external exiftool for some operations. (image-dired-get-exif-file-name) (image-dired-thumbnail-set-image-description): Use exif.el functions instead of exiftool. * lisp/image/exif.el (exif-tag-alist): Add description and copyright fields. * test/lisp/image-dired-tests.el: New file.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/image-dired-tests.el36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/lisp/image-dired-tests.el b/test/lisp/image-dired-tests.el
new file mode 100644
index 00000000000..0f1dbe54dc5
--- /dev/null
+++ b/test/lisp/image-dired-tests.el
@@ -0,0 +1,36 @@
1;;; image-dired-tests.el --- Tests for image-dired.el -*- lexical-binding: t -*-
2
3;; Copyright (C) 2021 Free Software Foundation, Inc.
4
5;; This file is part of GNU Emacs.
6
7;; GNU Emacs is free software: you can redistribute it and/or modify
8;; it under the terms of the GNU General Public License as published by
9;; the Free Software Foundation, either version 3 of the License, or
10;; (at your option) any later version.
11
12;; GNU Emacs is distributed in the hope that it will be useful,
13;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;; GNU General Public License for more details.
16
17;; You should have received a copy of the GNU General Public License
18;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
19
20;;; Code:
21
22(require 'ert)
23(require 'image-dired)
24
25(defun image-dired-test-image-file (name)
26 (expand-file-name
27 name (expand-file-name "data/image"
28 (or (getenv "EMACS_TEST_DIRECTORY")
29 "../"))))
30
31(ert-deftest image-dired-tests-get-exif-file-name ()
32 (let ((img (image-dired-test-image-file "black.jpg")))
33 (should (equal (image-dired-get-exif-file-name img)
34 "2019_09_21_16_22_13_black.jpg"))))
35
36;;; image-dired-tests.el ends here