diff options
| author | Michael Albinus | 2018-01-22 09:12:16 +0100 |
|---|---|---|
| committer | Michael Albinus | 2018-01-22 09:12:16 +0100 |
| commit | d0fd9809d7574c67a181225fcc1c59afdbb1295c (patch) | |
| tree | 9f937d58f01f4f353fe6fa9eb766dd01be0f84ea /test | |
| parent | b3fb0d47c158cb0d1acdce5008628e1d1a337bbb (diff) | |
| download | emacs-d0fd9809d7574c67a181225fcc1c59afdbb1295c.tar.gz emacs-d0fd9809d7574c67a181225fcc1c59afdbb1295c.zip | |
Finish changes in autorevert from commit 530bb2dc68
* lisp/autorevert.el (auto-revert-buffers):
Check `auto-revert-timer' being a timerp.
* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Adapt test in order to cover changed behavior of autorevert.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/filenotify-tests.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 8745fdc9e50..f2feef6132b 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el | |||
| @@ -884,8 +884,8 @@ delivered." | |||
| 884 | ;; Stop file notification. Autorevert shall still work via polling. | 884 | ;; Stop file notification. Autorevert shall still work via polling. |
| 885 | (file-notify-rm-watch auto-revert-notify-watch-descriptor) | 885 | (file-notify-rm-watch auto-revert-notify-watch-descriptor) |
| 886 | (file-notify--wait-for-events | 886 | (file-notify--wait-for-events |
| 887 | timeout (null auto-revert-use-notify)) | 887 | timeout (null auto-revert-notify-watch-descriptor)) |
| 888 | (should-not auto-revert-use-notify) | 888 | (should auto-revert-use-notify) |
| 889 | (should-not auto-revert-notify-watch-descriptor) | 889 | (should-not auto-revert-notify-watch-descriptor) |
| 890 | 890 | ||
| 891 | ;; Modify file. We wait for two seconds, in order to | 891 | ;; Modify file. We wait for two seconds, in order to |
| @@ -902,7 +902,10 @@ delivered." | |||
| 902 | (string-match | 902 | (string-match |
| 903 | (format-message "Reverting buffer `%s'." (buffer-name buf)) | 903 | (format-message "Reverting buffer `%s'." (buffer-name buf)) |
| 904 | captured-messages)) | 904 | captured-messages)) |
| 905 | (should (string-match "foo bla" (buffer-string))))) | 905 | (should (string-match "foo bla" (buffer-string)))) |
| 906 | |||
| 907 | ;; Stop autorevert, in order to cleanup descriptor. | ||
| 908 | (auto-revert-mode -1)) | ||
| 906 | 909 | ||
| 907 | ;; The environment shall be cleaned up. | 910 | ;; The environment shall be cleaned up. |
| 908 | (file-notify--test-cleanup-p)) | 911 | (file-notify--test-cleanup-p)) |