emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 34b4da3: Fix an eshell ls dired test for non-recent


From: Glenn Morris
Subject: [Emacs-diffs] master 34b4da3: Fix an eshell ls dired test for non-recent files
Date: Sat, 15 Dec 2018 17:50:17 -0500 (EST)

branch: master
commit 34b4da377ae02a0c505574f5ca5f146e92cfd046
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Fix an eshell ls dired test for non-recent files
    
    * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844):
    Work around an eshell issue with non-recent files.  (Bug#33734)
---
 test/lisp/eshell/em-ls-tests.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el
index ea9dbff..9691ffc 100644
--- a/test/lisp/eshell/em-ls-tests.el
+++ b/test/lisp/eshell/em-ls-tests.el
@@ -93,7 +93,14 @@
           (dired-toggle-marks)
           (should (cdr (dired-get-marked-files)))
           (kill-buffer buf)
-          (setq buf (dired (expand-file-name "lisp/subr.el" source-directory)))
+          ;; Eshell's default format duplicates the year for non-recent files,
+          ;; eg "2015-05-06  2015", which doesn't make a lot of sense,
+          ;; and causes this portion of the test to fail if subr.el
+          ;; is non-recent (eg if building from a tarfile unpacked
+          ;; with a fixed early timestamp for reproducibility).  Bug#33734.
+          (let ((eshell-ls-date-format "%b %e"))
+            (setq buf (dired (expand-file-name "lisp/subr.el"
+                                               source-directory))))
           (should (looking-at "subr\\.el")))
       (customize-set-variable 'eshell-ls-use-in-dired orig)
       (and (buffer-live-p buf) (kill-buffer)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]