]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix autorevert-tests on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Sun, 19 Jan 2025 12:42:46 +0000 (14:42 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 15:58:46 +0000 (16:58 +0100)
* test/lisp/autorevert-tests.el
(auto-revert-test04-auto-revert-mode-dired): Fix test on
MS-Windows.

(cherry picked from commit be786ab3bb263cb88e548f439562cbdf93587a3f)

test/lisp/autorevert-tests.el

index 8133b5812a7079a8f470d4c2dd9376689cd64df0..5e46216cc42a8a130cdbeead30918a471acaec3c 100644 (file)
@@ -390,11 +390,17 @@ This expects `auto-revert--messages' to be bound by
                (should auto-revert-mode)
                (should
                 (string-match name (substring-no-properties (buffer-string))))
+               ;; If we don't sleep for a while, this test fails on
+               ;; MS-Windows.
+               (if (eq system-type 'windows-nt)
+                   (sleep-for 0.5))
 
                (ert-with-message-capture auto-revert--messages
                  ;; Delete file.
                  (delete-file tmpfile)
                  (auto-revert--wait-for-revert buf))
+               (if (eq system-type 'windows-nt)
+                   (sleep-for 1))
                ;; Check, that the buffer has been reverted.
                (should-not
                 (string-match name (substring-no-properties (buffer-string))))