aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-08-20 21:32:34 +0200
committerMichael Albinus2019-08-20 21:32:34 +0200
commitfde614f4cc531f778ba082b0f29a7422be8ea433 (patch)
tree57bf6ef3892212e06f0f6a4d40d6a989d240ffb9
parent68f086e66906a5aa9bb447cdebac71ced98a0663 (diff)
downloademacs-fde614f4cc531f778ba082b0f29a7422be8ea433.tar.gz
emacs-fde614f4cc531f778ba082b0f29a7422be8ea433.zip
Another attempt to fix bug#32645
* test/lisp/autorevert-tests.el () (auto-revert-test02-auto-revert-deleted-file): * test/lisp/filenotify-tests.el (file-notify-test04-autorevert): Check `file-notify-valid-p', not that the descriptor is nil.
-rw-r--r--test/lisp/autorevert-tests.el6
-rw-r--r--test/lisp/filenotify-tests.el3
2 files changed, 6 insertions, 3 deletions
diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el
index c024739f6e5..0ff3c5a4071 100644
--- a/test/lisp/autorevert-tests.el
+++ b/test/lisp/autorevert-tests.el
@@ -283,7 +283,8 @@ This expects `auto-revert--messages' to be bound by
283 (write-region "any text" nil tmpfile nil 'no-message) 283 (write-region "any text" nil tmpfile nil 'no-message)
284 (setq buf (find-file-noselect tmpfile)) 284 (setq buf (find-file-noselect tmpfile))
285 (with-current-buffer buf 285 (with-current-buffer buf
286 (should-not auto-revert-notify-watch-descriptor) 286 (should-not
287 (file-notify-valid-p auto-revert-notify-watch-descriptor))
287 (should (string-equal (buffer-string) "any text")) 288 (should (string-equal (buffer-string) "any text"))
288 ;; `buffer-stale--default-function' checks for 289 ;; `buffer-stale--default-function' checks for
289 ;; `verify-visited-file-modtime'. We must ensure that 290 ;; `verify-visited-file-modtime'. We must ensure that
@@ -314,7 +315,8 @@ This expects `auto-revert--messages' to be bound by
314 ;; With w32notify, and on emba, the `stopped' events are not sent. 315 ;; With w32notify, and on emba, the `stopped' events are not sent.
315 (or (eq file-notify--library 'w32notify) 316 (or (eq file-notify--library 'w32notify)
316 (getenv "EMACS_EMBA_CI") 317 (getenv "EMACS_EMBA_CI")
317 (should-not auto-revert-notify-watch-descriptor)) 318 (should-not
319 (file-notify-valid-p auto-revert-notify-watch-descriptor)))
318 320
319 ;; Once the file has been recreated, the buffer shall be 321 ;; Once the file has been recreated, the buffer shall be
320 ;; reverted. 322 ;; reverted.
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 2027299197b..0b6e66e73a6 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -946,7 +946,8 @@ delivered."
946 (file-notify--test-wait-for-events 946 (file-notify--test-wait-for-events
947 timeout (null auto-revert-notify-watch-descriptor)) 947 timeout (null auto-revert-notify-watch-descriptor))
948 (should auto-revert-use-notify) 948 (should auto-revert-use-notify)
949 (should-not auto-revert-notify-watch-descriptor) 949 (should-not
950 (file-notify-valid-p auto-revert-notify-watch-descriptor))
950 951
951 ;; Modify file. We wait for two seconds, in order to 952 ;; Modify file. We wait for two seconds, in order to
952 ;; have another timestamp. One second seems to be too 953 ;; have another timestamp. One second seems to be too