[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5efc7b22cec: Fix image-dired-utils-tests after 83b6a8a5147 (bug#6
From: |
Eli Zaretskii |
Subject: |
master 5efc7b22cec: Fix image-dired-utils-tests after 83b6a8a5147 (bug#61394) |
Date: |
Fri, 28 Jul 2023 02:50:35 -0400 (EDT) |
branch: master
commit 5efc7b22cecc0cf1e7dd2bbbc26400dba35e33ea
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix image-dired-utils-tests after 83b6a8a5147 (bug#61394)
---
test/lisp/image/image-dired-util-tests.el | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/test/lisp/image/image-dired-util-tests.el
b/test/lisp/image/image-dired-util-tests.el
index 1f3747a82b1..273a32d5dbb 100644
--- a/test/lisp/image/image-dired-util-tests.el
+++ b/test/lisp/image/image-dired-util-tests.el
@@ -57,20 +57,23 @@
"jpg")))))
(ert-deftest image-dired-thumb-name/per-directory ()
- (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")))
+ (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)))
(should (equal
- (file-name-nondirectory (image-dired-thumb-name "foo.jpg"))
- (file-name-nondirectory (image-dired-thumb-name "/tmp/foo.jpg"))))
+ (file-name-nondirectory (image-dired-thumb-name rel-path))
+ (file-name-nondirectory (image-dired-thumb-name abs-path))))
;; 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 "/tmp/foo.jpg")))
- '("tmp" ".image-dired" "foo.jpg.thumb.jpg")))
+ (image-dired-thumb-name abs-path)))
+ (list "tmp" ".image-dired" hash-name)))
(should (equal (file-name-nondirectory
- (image-dired-thumb-name "foo.jpg"))
- "foo.jpg.thumb.jpg"))))
+ (image-dired-thumb-name rel-path))
+ hash-name))))
;;; image-dired-util-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5efc7b22cec: Fix image-dired-utils-tests after 83b6a8a5147 (bug#61394),
Eli Zaretskii <=