]> git.eshelyaron.com Git - emacs.git/commitdiff
Another attempt to fix bug#32645
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 20 Aug 2019 19:32:34 +0000 (21:32 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 20 Aug 2019 19:32:34 +0000 (21:32 +0200)
* test/lisp/autorevert-tests.el ()
(auto-revert-test02-auto-revert-deleted-file):
* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Check `file-notify-valid-p', not that the descriptor is nil.

test/lisp/autorevert-tests.el
test/lisp/filenotify-tests.el

index c024739f6e5e8d999a5d3337af14c817feda78c6..0ff3c5a4071f29b4ea50c6bfc6f2329d0143d490 100644 (file)
@@ -283,7 +283,8 @@ This expects `auto-revert--messages' to be bound by
           (write-region "any text" nil tmpfile nil 'no-message)
          (setq buf (find-file-noselect tmpfile))
          (with-current-buffer buf
-            (should-not auto-revert-notify-watch-descriptor)
+            (should-not
+             (file-notify-valid-p auto-revert-notify-watch-descriptor))
             (should (string-equal (buffer-string) "any text"))
             ;; `buffer-stale--default-function' checks for
             ;; `verify-visited-file-modtime'.  We must ensure that
@@ -314,7 +315,8 @@ This expects `auto-revert--messages' to be bound by
             ;; With w32notify, and on emba, the `stopped' events are not sent.
             (or (eq file-notify--library 'w32notify)
                 (getenv "EMACS_EMBA_CI")
-                (should-not auto-revert-notify-watch-descriptor))
+                (should-not
+                 (file-notify-valid-p auto-revert-notify-watch-descriptor)))
 
             ;; Once the file has been recreated, the buffer shall be
             ;; reverted.
index 2027299197b8c2b4e184bc76a7813dd3d708c671..0b6e66e73a6fd0e430e824816611fc716d66e8ab 100644 (file)
@@ -946,7 +946,8 @@ delivered."
            (file-notify--test-wait-for-events
             timeout (null auto-revert-notify-watch-descriptor))
            (should auto-revert-use-notify)
-           (should-not auto-revert-notify-watch-descriptor)
+           (should-not
+             (file-notify-valid-p auto-revert-notify-watch-descriptor))
 
            ;; Modify file.  We wait for two seconds, in order to
            ;; have another timestamp.  One second seems to be too