]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Fix image-dired-utils-tests after 83b6a8a5147 (bug#61394)"
authorEli Zaretskii <eliz@gnu.org>
Thu, 3 Aug 2023 08:40:44 +0000 (11:40 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 3 Aug 2023 08:40:44 +0000 (11:40 +0300)
This reverts commit 5efc7b22cecc0cf1e7dd2bbbc26400dba35e33ea.
It is no longer needed, see bug#61394.

test/lisp/image/image-dired-util-tests.el

index 273a32d5dbb46f0941ba8d0a6527242b5b364ea9..1f3747a82b1716fa09457927f52209e3d940792c 100644 (file)
                      "jpg")))))
 
 (ert-deftest image-dired-thumb-name/per-directory ()
-  (let ((image-dired-thumbnail-storage 'per-directory)
-        (rel-path "foo.jpg")
-        (abs-path "/tmp/foo.jpg")
-        (hash-name (concat (sha1 "foo.jpg") ".jpg")))
-    (should (file-name-absolute-p (image-dired-thumb-name rel-path)))
-    (should (file-name-absolute-p (image-dired-thumb-name abs-path)))
+  (let ((image-dired-thumbnail-storage 'per-directory))
+    (should (file-name-absolute-p (image-dired-thumb-name "foo.jpg")))
+    (should (file-name-absolute-p (image-dired-thumb-name "/tmp/foo.jpg")))
     (should (equal
-             (file-name-nondirectory (image-dired-thumb-name rel-path))
-             (file-name-nondirectory (image-dired-thumb-name abs-path))))
+             (file-name-nondirectory (image-dired-thumb-name "foo.jpg"))
+             (file-name-nondirectory (image-dired-thumb-name "/tmp/foo.jpg"))))
     ;; The cdr below avoids the system dependency in the car of the
     ;; list returned by 'file-name-split': it's "" on Posix systems,
     ;; but the drive letter on MS-Windows.
     (should (equal (cdr (file-name-split
-                         (image-dired-thumb-name abs-path)))
-                   (list "tmp" ".image-dired" hash-name)))
+                         (image-dired-thumb-name "/tmp/foo.jpg")))
+                   '("tmp" ".image-dired" "foo.jpg.thumb.jpg")))
     (should (equal (file-name-nondirectory
-                    (image-dired-thumb-name rel-path))
-                   hash-name))))
+                    (image-dired-thumb-name "foo.jpg"))
+                   "foo.jpg.thumb.jpg"))))
 
 ;;; image-dired-util-tests.el ends here