]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/filenotify-tests.el (file-notify-test03-events): Adapt test.
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Jan 2019 09:46:49 +0000 (10:46 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Jan 2019 09:46:49 +0000 (10:46 +0100)
lisp/filenotify.el
test/lisp/filenotify-tests.el

index a0063f8808a1bb9b4e0455b19c6e88f4dab1db18..c79bc4fb60215a73dfa135f88b72fde4115e27ed 100644 (file)
@@ -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
index 60b2fbeada75458e2c2eb34cef7cc6a2d834ccf4..6c0e8f14aacca4b3ee2c28142d7a1039038935d0 100644 (file)
@@ -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.