[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c5305ff: Add more should form calls in a failing di
From: |
Tino Calancha |
Subject: |
[Emacs-diffs] master c5305ff: Add more should form calls in a failing dired test |
Date: |
Tue, 1 Aug 2017 06:06:44 -0400 (EDT) |
branch: master
commit c5305ff6c40a2650ed9878f69ce58829927c3978
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>
Add more should form calls in a failing dired test
Some dired tests fail intermittently in hydra. Add few
more should form calls for debugging.
See:
https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01092.html
* test/lisp/dired-tests.el (dired-test-bug27243-01): Add few more should
forms for debugging.
---
test/lisp/dired-tests.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index d6fe839..0ee4e13 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -122,11 +122,18 @@
(ert-deftest dired-test-bug27243-01 ()
"Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#5 ."
- (let ((test-dir (make-temp-file "test-dir-" t))
+ (let ((test-dir (file-name-as-directory (make-temp-file "test-dir-" t)))
(dired-auto-revert-buffer t) buffers)
+ (should-not (dired-buffers-for-dir test-dir))
(with-current-buffer (find-file-noselect test-dir)
(make-directory "test-subdir"))
+ ;; Point must be at end-of-buffer.
+ (with-current-buffer (car (dired-buffers-for-dir test-dir))
+ (should (eobp)))
(push (dired test-dir) buffers)
+ ;; Previous dired call shouldn't create a new buffer: must visit the one
+ ;; created by `find-file-noselect' above.
+ (should (eq 1 (length (dired-buffers-for-dir test-dir))))
(unwind-protect
(let ((buf (current-buffer))
(pt1 (point))
@@ -135,11 +142,10 @@
(write-region "Test" nil test-file nil 'silent nil 'excl)
;; Sanity check: point should now be on the subdirectory.
(should (equal (dired-file-name-at-point)
- (concat (file-name-as-directory test-dir)
- (file-name-as-directory "test-subdir"))))
+ (concat test-dir (file-name-as-directory
"test-subdir"))))
(push (dired-find-file) buffers)
(let ((pt2 (point))) ; Point is on test-file.
- (switch-to-buffer buf)
+ (pop-to-buffer-same-window buf)
;; Sanity check: point should now be back on the subdirectory.
(should (eq (point) pt1))
(push (dired-find-file) buffers)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master c5305ff: Add more should form calls in a failing dired test,
Tino Calancha <=