diff options
| author | Glenn Morris | 2018-12-15 14:49:46 -0800 |
|---|---|---|
| committer | Glenn Morris | 2018-12-15 14:49:46 -0800 |
| commit | 34b4da377ae02a0c505574f5ca5f146e92cfd046 (patch) | |
| tree | 51a062bd68121ab35f8877f7c582763d34aaf03d | |
| parent | 760b091ac5c6e8e49ebbf7c080f500cfad2e1579 (diff) | |
| download | emacs-34b4da377ae02a0c505574f5ca5f146e92cfd046.tar.gz emacs-34b4da377ae02a0c505574f5ca5f146e92cfd046.zip | |
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)
| -rw-r--r-- | test/lisp/eshell/em-ls-tests.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el index ea9dbff48fc..9691ffc8970 100644 --- a/test/lisp/eshell/em-ls-tests.el +++ b/test/lisp/eshell/em-ls-tests.el | |||
| @@ -93,7 +93,14 @@ | |||
| 93 | (dired-toggle-marks) | 93 | (dired-toggle-marks) |
| 94 | (should (cdr (dired-get-marked-files))) | 94 | (should (cdr (dired-get-marked-files))) |
| 95 | (kill-buffer buf) | 95 | (kill-buffer buf) |
| 96 | (setq buf (dired (expand-file-name "lisp/subr.el" source-directory))) | 96 | ;; Eshell's default format duplicates the year for non-recent files, |
| 97 | ;; eg "2015-05-06 2015", which doesn't make a lot of sense, | ||
| 98 | ;; and causes this portion of the test to fail if subr.el | ||
| 99 | ;; is non-recent (eg if building from a tarfile unpacked | ||
| 100 | ;; with a fixed early timestamp for reproducibility). Bug#33734. | ||
| 101 | (let ((eshell-ls-date-format "%b %e")) | ||
| 102 | (setq buf (dired (expand-file-name "lisp/subr.el" | ||
| 103 | source-directory)))) | ||
| 97 | (should (looking-at "subr\\.el"))) | 104 | (should (looking-at "subr\\.el"))) |
| 98 | (customize-set-variable 'eshell-ls-use-in-dired orig) | 105 | (customize-set-variable 'eshell-ls-use-in-dired orig) |
| 99 | (and (buffer-live-p buf) (kill-buffer))))) | 106 | (and (buffer-live-p buf) (kill-buffer))))) |