]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix auto-revert-tests.el when filenotify isn't used
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 6 Dec 2015 09:40:23 +0000 (09:40 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 6 Dec 2015 09:40:23 +0000 (09:40 +0000)
* test/automated/auto-revert-tests.el (auto-revert--wait-for-revert):
Make it working also when filenotify isn't used.

test/automated/auto-revert-tests.el

index 2745f106087fd938e059427a7c88782ccb29690f..e03ed8cb68777cb2a24c3c364d134605df1581ec 100644 (file)
@@ -39,7 +39,9 @@
           (null (string-match
                  (format-message "Reverting buffer `%s'." (buffer-name buffer))
                  (buffer-string)))
-        (read-event nil nil 0.1)))))
+       (if (with-current-buffer buffer auto-revert-use-notify)
+           (read-event nil nil 0.1)
+         (sleep-for 0.1))))))
 
 (ert-deftest auto-revert-test00-auto-revert-mode ()
   "Check autorevert for a file."