[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ebff417: Fix filenotify-tests.el for cygwin
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] master ebff417: Fix filenotify-tests.el for cygwin |
Date: |
Mon, 1 May 2017 06:16:25 -0400 (EDT) |
branch: master
commit ebff4177e2a0226aa1e65181307acfdadfbded3b
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>
Fix filenotify-tests.el for cygwin
* test/lisp/filenotify-tests.el (file-notify--test-read-event):
Add an additional `sit-for'.
(file-notify-test02-rm-watch): Add an additional
`file-notify--test-read-event' call.
---
lisp/filenotify.el | 4 ++--
test/lisp/filenotify-tests.el | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 0a45db8..64cfab1 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -188,8 +188,8 @@ EVENT is the cadr of the event in `file-notify-handle-event'
((memq action '(attrib link)) 'attribute-changed)
((memq action '(create added)) 'created)
((memq action '(modify modified write)) 'changed)
- ((memq action
- '(delete delete-self move-self removed)) 'deleted)
+ ((memq action '(delete delete-self move-self removed))
+ 'deleted)
;; Make the event pending.
((memq action '(moved-from renamed-from))
(setq file-notify--pending-event
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 54e7ebf..78a68f2 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -69,6 +69,7 @@
(defun file-notify--test-read-event ()
"Read one event.
There are different timeouts for local and remote file notification libraries."
+ (sit-for 0.001 'nodisp)
(read-event
nil nil
(cond
@@ -426,6 +427,7 @@ This returns only for the local case and gfilenotify;
otherwise it is nil.
;; Remove first watch.
(file-notify-rm-watch file-notify--test-desc)
;; Only the second callback shall run.
+ (file-notify--test-read-event)
(delete-file file-notify--test-tmpfile)
(file-notify--wait-for-events
(file-notify--test-timeout) results)
@@ -953,7 +955,7 @@ delivered."
;; After deleting the parent directory, the descriptor must
;; not be valid anymore.
(should-not (file-notify-valid-p file-notify--test-desc))
- ;; w32notify doesn't generate 'stopped' events when the parent
+ ;; w32notify doesn't generate `stopped' events when the parent
;; directory is deleted, which doesn't provide a chance for
;; filenotify.el to remove the descriptor from the internal
;; hash table it maintains. So we must remove the descriptor
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ebff417: Fix filenotify-tests.el for cygwin,
Michael Albinus <=