]> git.eshelyaron.com Git - emacs.git/commitdiff
Adapt filenotify-tests
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 6 Jan 2019 15:35:38 +0000 (16:35 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 6 Jan 2019 15:35:38 +0000 (16:35 +0100)
lisp/filenotify.el
test/lisp/filenotify-tests.el

index c05e0657affb0c322de079686ece382c07f0e036..ef3be8a4a9bba2bef0797dc1fa7509593bb70766 100644 (file)
@@ -239,11 +239,11 @@ EVENT is the cadr of the event in `file-notify-handle-event'
                            (string-equal
                             (file-notify--watch-filename watch)
                             (file-name-nondirectory file1)))))
-            (message
-             "file-notify-callback %S %S %S %S %S %S %S"
-             desc action file file1 watch
-             (file-notify--event-watched-file event)
-             (file-notify--watch-directory watch))
+            ;;(message
+            ;;"file-notify-callback %S %S %S %S %S %S %S"
+            ;;desc action file file1 watch
+            ;;(file-notify--event-watched-file event)
+            ;;(file-notify--watch-directory watch))
             (funcall (file-notify--watch-callback watch)
                      (if file1
                          `(,desc ,action ,file ,file1)
@@ -421,7 +421,6 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'."
               descriptor))
            t))))
 
-
 ;; TODO:
 
 ;; * Watching a file in an already watched directory.
index ee2bc30353ccdd8c63f16c3940774740a0514241..b74d939519fb3b4e9fd5cbbc2104e28f96069fee 100644 (file)
@@ -690,7 +690,7 @@ delivered."
              '(created changed deleted stopped))
              ;; inotify on emba does not detect `deleted' and
              ;; `stopped' events of the directory.
-             ((and (string-equal (file-notify--test-library) "inotify")
+             ((and (string-match "inotify" (file-notify--test-library))
                    (getenv "EMACS_EMBA_CI"))
               '(created changed deleted))
             (t '(created changed deleted deleted stopped)))
@@ -740,7 +740,7 @@ delivered."
              '(created changed created changed deleted stopped))
              ;; inotify on emba does not detect `deleted' and
              ;; `stopped' events of the directory.
-             ((and (string-equal (file-notify--test-library) "inotify")
+             ((and (string-match "inotify" (file-notify--test-library))
                    (getenv "EMACS_EMBA_CI"))
               '(created changed created changed deleted deleted))
             (t '(created changed created changed
@@ -797,7 +797,7 @@ delivered."
              '(created changed renamed deleted stopped))
              ;; inotify on emba does not detect `deleted' and
              ;; `stopped' events of the directory.
-             ((and (string-equal (file-notify--test-library) "inotify")
+             ((and (string-match "inotify" (file-notify--test-library))
                    (getenv "EMACS_EMBA_CI"))
               '(created changed renamed deleted))
             (t '(created changed renamed deleted deleted stopped)))
@@ -1019,7 +1019,7 @@ delivered."
 
   ;; inotify on emba does not detect `deleted' and
   ;; `stopped' events of the directory.
-  (unless (and (string-equal (file-notify--test-library) "inotify")
+  (unless (and (string-match "inotify" (file-notify--test-library))
                (getenv "EMACS_EMBA_CI"))
     (unwind-protect
         (let ((file-notify--test-tmpdir
@@ -1106,7 +1106,7 @@ delivered."
 
   ;; inotify on emba does not detect `deleted' and
   ;; `stopped' events of the directory.
-  (unless (and (string-equal (file-notify--test-library) "inotify")
+  (unless (and (string-match "inotify" (file-notify--test-library))
                (getenv "EMACS_EMBA_CI"))
     (unwind-protect
         (progn
@@ -1199,7 +1199,7 @@ delivered."
             (delete-file file)))
         (delete-directory file-notify--test-tmpfile)
         (if (or (string-equal (file-notify--test-library) "w32notify")
-                (and (string-equal (file-notify--test-library) "inotify")
+                (and (string-match "inotify" (file-notify--test-library))
                      (getenv "EMACS_EMBA_CI")))
             (file-notify--rm-descriptor file-notify--test-desc))
 
@@ -1411,17 +1411,17 @@ the file watch."
                   ((string-equal (file-notify--test-library) "w32notify") '())
                   ;; inotify on emba does not detect `deleted' and
                   ;; `stopped' events of the directory.
-                  ((and (string-equal (file-notify--test-library) "inotify")
+                  ((and (string-match "inotify" (file-notify--test-library))
                         (getenv "EMACS_EMBA_CI"))
                    '())
                   (t '(deleted stopped))))))
           (delete-directory file-notify--test-tmpfile 'recursive))
-        (unless (and (string-equal (file-notify--test-library) "inotify")
+        (unless (and (string-match "inotify" (file-notify--test-library))
                      (getenv "EMACS_EMBA_CI"))
           (should-not (file-notify-valid-p file-notify--test-desc1))
           (should-not (file-notify-valid-p file-notify--test-desc2)))
         (when (or (string-equal (file-notify--test-library) "w32notify")
-                  (and (string-equal (file-notify--test-library) "inotify")
+                  (and (string-match "inotify" (file-notify--test-library))
                        (getenv "EMACS_EMBA_CI")))
           (file-notify--rm-descriptor file-notify--test-desc1)
           (file-notify--rm-descriptor file-notify--test-desc2))