aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Brown2016-12-31 16:16:12 -0500
committerKen Brown2016-12-31 16:16:12 -0500
commita60d77b8400edc130a1f48802e9257592234095a (patch)
treed6b4528401c0930ba8e189bdb29285f5b3588aee
parent0513e16459fdd3edb41358478a1194b943d84896 (diff)
downloademacs-a60d77b8400edc130a1f48802e9257592234095a.tar.gz
emacs-a60d77b8400edc130a1f48802e9257592234095a.zip
Further improve filenotify-tests.el
* test/lisp/filenotify-tests.el (file-notify--test-read-event): Adapt to file monitors of type GFamFileMonitor, which occur on Cygwin. (file-notify--test-monitor): Update doc string.
-rw-r--r--test/lisp/filenotify-tests.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index e2bcc6b0f7e..bd7f191dac6 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -70,10 +70,13 @@ There are different timeouts for local and remote file notification libraries."
70 (read-event 70 (read-event
71 nil nil 71 nil nil
72 (cond 72 (cond
73 ;; gio/gpollfilemonitor.c declares POLL_TIME_SECS 5. So we must 73 ;; gio/gpollfilemonitor.c declares POLL_TIME_SECS 5. So we must
74 ;; wait at least this time. 74 ;; wait at least this time in the GPollFileMonitor case. A
75 ;; similar timeout seems to be needed in the GFamFileMonitor case,
76 ;; at least on Cygwin.
75 ((and (string-equal (file-notify--test-library) "gfilenotify") 77 ((and (string-equal (file-notify--test-library) "gfilenotify")
76 (string-equal (file-notify--test-monitor) "GPollFileMonitor")) 78 (memq (file-notify--test-monitor)
79 '(GFamFileMonitor GPollFileMonitor)))
77 7) 80 7)
78 ((file-remote-p temporary-file-directory) 0.1) 81 ((file-remote-p temporary-file-directory) 0.1)
79 (t 0.01)))) 82 (t 0.01))))
@@ -204,7 +207,7 @@ remote host, or nil."
204 (process-name (cdr file-notify--test-remote-enabled-checked)))))) 207 (process-name (cdr file-notify--test-remote-enabled-checked))))))
205 208
206(defun file-notify--test-monitor () 209(defun file-notify--test-monitor ()
207 "The used monitor for the test, as a string. 210 "The used monitor for the test, as a symbol.
208This returns only for the local case and gfilenotify; otherwise it is nil. 211This returns only for the local case and gfilenotify; otherwise it is nil.
209`file-notify--test-desc' must be a valid watch descriptor." 212`file-notify--test-desc' must be a valid watch descriptor."
210 (and file-notify--test-desc 213 (and file-notify--test-desc