emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/albinus e906266: * test/lisp/filenotify-tests.el (


From: Michael Albinus
Subject: [Emacs-diffs] scratch/albinus e906266: * test/lisp/filenotify-tests.el (file-notify-test03-events): Adapt test.
Date: Sat, 5 Jan 2019 04:46:57 -0500 (EST)

branch: scratch/albinus
commit e906266874fcbf1229fa6d5abbe795aaccff2f82
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    * test/lisp/filenotify-tests.el (file-notify-test03-events): Adapt test.
---
 lisp/filenotify.el            | 7 +++----
 test/lisp/filenotify-tests.el | 6 ++++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index a0063f8..c79bc4f 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 60b2fbe..6c0e8f1 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]