diff options
| author | Manuel Giraud | 2023-07-27 23:26:30 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-07-28 09:50:48 +0300 |
| commit | 5efc7b22cecc0cf1e7dd2bbbc26400dba35e33ea (patch) | |
| tree | a28f57288681680974829c056c0901a43a8a834b | |
| parent | 36b6124d810679cc0f23282d51d9bf8b01f26011 (diff) | |
| download | emacs-5efc7b22cecc0cf1e7dd2bbbc26400dba35e33ea.tar.gz emacs-5efc7b22cecc0cf1e7dd2bbbc26400dba35e33ea.zip | |
Fix image-dired-utils-tests after 83b6a8a5147 (bug#61394)
| -rw-r--r-- | test/lisp/image/image-dired-util-tests.el | 21 |
1 files 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 @@ | |||
| 57 | "jpg"))))) | 57 | "jpg"))))) |
| 58 | 58 | ||
| 59 | (ert-deftest image-dired-thumb-name/per-directory () | 59 | (ert-deftest image-dired-thumb-name/per-directory () |
| 60 | (let ((image-dired-thumbnail-storage 'per-directory)) | 60 | (let ((image-dired-thumbnail-storage 'per-directory) |
| 61 | (should (file-name-absolute-p (image-dired-thumb-name "foo.jpg"))) | 61 | (rel-path "foo.jpg") |
| 62 | (should (file-name-absolute-p (image-dired-thumb-name "/tmp/foo.jpg"))) | 62 | (abs-path "/tmp/foo.jpg") |
| 63 | (hash-name (concat (sha1 "foo.jpg") ".jpg"))) | ||
| 64 | (should (file-name-absolute-p (image-dired-thumb-name rel-path))) | ||
| 65 | (should (file-name-absolute-p (image-dired-thumb-name abs-path))) | ||
| 63 | (should (equal | 66 | (should (equal |
| 64 | (file-name-nondirectory (image-dired-thumb-name "foo.jpg")) | 67 | (file-name-nondirectory (image-dired-thumb-name rel-path)) |
| 65 | (file-name-nondirectory (image-dired-thumb-name "/tmp/foo.jpg")))) | 68 | (file-name-nondirectory (image-dired-thumb-name abs-path)))) |
| 66 | ;; The cdr below avoids the system dependency in the car of the | 69 | ;; The cdr below avoids the system dependency in the car of the |
| 67 | ;; list returned by 'file-name-split': it's "" on Posix systems, | 70 | ;; list returned by 'file-name-split': it's "" on Posix systems, |
| 68 | ;; but the drive letter on MS-Windows. | 71 | ;; but the drive letter on MS-Windows. |
| 69 | (should (equal (cdr (file-name-split | 72 | (should (equal (cdr (file-name-split |
| 70 | (image-dired-thumb-name "/tmp/foo.jpg"))) | 73 | (image-dired-thumb-name abs-path))) |
| 71 | '("tmp" ".image-dired" "foo.jpg.thumb.jpg"))) | 74 | (list "tmp" ".image-dired" hash-name))) |
| 72 | (should (equal (file-name-nondirectory | 75 | (should (equal (file-name-nondirectory |
| 73 | (image-dired-thumb-name "foo.jpg")) | 76 | (image-dired-thumb-name rel-path)) |
| 74 | "foo.jpg.thumb.jpg")))) | 77 | hash-name)))) |
| 75 | 78 | ||
| 76 | ;;; image-dired-util-tests.el ends here | 79 | ;;; image-dired-util-tests.el ends here |