From: Michael Albinus Date: Sat, 5 Jan 2019 09:46:49 +0000 (+0100) Subject: * test/lisp/filenotify-tests.el (file-notify-test03-events): Adapt test. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e906266874fcbf1229fa6d5abbe795aaccff2f82;p=emacs.git * test/lisp/filenotify-tests.el (file-notify-test03-events): Adapt test. --- diff --git a/lisp/filenotify.el b/lisp/filenotify.el index a0063f8808a..c79bc4fb602 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -114,7 +114,7 @@ Could be different from the directory watched by the backend library." (when-let* ((watch (gethash (car event) file-notify-descriptors))) (directory-file-name (expand-file-name - (or (and (stringp (nth 2 event)) (nth 2 event)) "") + (or (and (stringp (nth 2 event)) (nth 2 event)) "") (file-notify--watch-directory watch))))) ;; Only `gfilenotify' could return two file names. @@ -421,9 +421,8 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'." ;; TODO: -;; * Watching a /dir/file may receive events for dir. -;; (This may be the desired behavior.) -;; * Watching a file in an already watched directory + +;; * Watching a file in an already watched directory. ;; If the file is created and *then* a watch is added to that file, the ;; watch might receive events which occurred prior to it being created, ;; due to the way events are propagated during idle time. Note: This diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 60b2fbeada7..6c0e8f14aac 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -673,8 +673,10 @@ delivered." (file-notify--test-with-events (cond ;; w32notify does not raise `deleted' and `stopped' - ;; events for the watched directory. - ((string-equal (file-notify--test-library) "w32notify") + ;; events for the watched directory. Same for inotify on emba. + ((or (string-equal (file-notify--test-library) "w32notify") + (and (string-equal (file-notify--test-library) "inotify") + (getenv "EMACS_EMBA_CI"))) '(created changed deleted)) ;; gvfs-monitor-dir on cygwin does not detect the ;; `created' event reliably.