emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116259: * automated/file-notify-tests.el (file-noti


From: Michael Albinus
Subject: [Emacs-diffs] trunk r116259: * automated/file-notify-tests.el (file-notify--wait-for-events):
Date: Tue, 04 Feb 2014 11:41:24 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116259
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2014-02-04 12:41:20 +0100
message:
  * automated/file-notify-tests.el (file-notify--wait-for-events):
  Use `read-event' instead of `sit-for'.
  (file-notify-test02-events): Remove expected result, the bug is
  fixed meanwhile.
  (file-notify-test02-events, file-notify-test03-autorevert):
  Use `sleep-for' instead of `sit-for'.
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/file-notify-tests.el 
filenotifytests.el-20130702144123-sxglvo6zs3jcj8w1-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2014-01-31 17:13:49 +0000
+++ b/test/ChangeLog    2014-02-04 11:41:20 +0000
@@ -1,3 +1,12 @@
+2014-02-04  Michael Albinus  <address@hidden>
+
+       * automated/file-notify-tests.el (file-notify--wait-for-events):
+       Use `read-event' instead of `sit-for'.
+       (file-notify-test02-events): Remove expected result, the bug is
+       fixed meanwhile.
+       (file-notify-test02-events, file-notify-test03-autorevert):
+       Use `sleep-for' instead of `sit-for'.
+
 2014-01-31  Dmitry Gutov  <address@hidden>
 
        * automated/ruby-mode-tests.el (ruby-align-chained-calls):

=== modified file 'test/automated/file-notify-tests.el'
--- a/test/automated/file-notify-tests.el       2014-01-27 19:10:02 +0000
+++ b/test/automated/file-notify-tests.el       2014-02-04 11:41:20 +0000
@@ -187,17 +187,10 @@
 TIMEOUT is the maximum time to wait for, in seconds."
   `(with-timeout (,timeout (ignore))
      (while (null ,until)
-       (let (noninteractive)
-        (sit-for 0.1 'nodisplay)))))
+       (read-event nil nil 0.1))))
 
 (ert-deftest file-notify-test02-events ()
   "Check file creation/removal notifications."
-  ;; Bug#16519.
-  :expected-result
-  (if (and noninteractive
-          (not (file-remote-p temporary-file-directory))
-          (memq file-notify--library '(gfilenotify w32notify)))
-      :failed :passed)
   (skip-unless (file-notify--test-local-enabled))
   (let (desc)
     (unwind-protect
@@ -214,7 +207,7 @@
          (write-region
           "any text" nil file-notify--test-tmpfile nil 'no-message)
          (delete-file file-notify--test-tmpfile)
-         (sit-for 0.1 'nodisplay)
+         (sleep-for 0.1)
 
          ;; Check copy and rename.
          (write-region
@@ -222,13 +215,13 @@
          (copy-file file-notify--test-tmpfile file-notify--test-tmpfile1)
          (delete-file file-notify--test-tmpfile)
          (delete-file file-notify--test-tmpfile1)
-         (sit-for 0.1 'nodisplay)
+         (sleep-for 0.1)
 
          (write-region
           "any text" nil file-notify--test-tmpfile nil 'no-message)
          (rename-file file-notify--test-tmpfile file-notify--test-tmpfile1)
          (delete-file file-notify--test-tmpfile1)
-         (sit-for 0.1 'nodisplay))
+         (sleep-for 0.1))
 
       ;; Wait for events, and exit.
       (file-notify--wait-for-events 5 file-notify--test-results)
@@ -274,7 +267,7 @@
            ;; `auto-revert-buffers' runs every 5".
            (with-timeout (timeout (ignore))
              (while (null auto-revert-notify-watch-descriptor)
-               (sit-for 1 'nodisplay)))
+               (sleep-for 1)))
 
            ;; Check, that file notification has been used.
            (should auto-revert-mode)
@@ -283,7 +276,7 @@
 
            ;; Modify file.  We wait for a second, in order to
            ;; have another timestamp.
-           (sit-for 1)
+           (sleep-for 1)
            (shell-command
             (format "echo -n 'another text' >%s"
                     (or (file-remote-p file-notify--test-tmpfile 'localname)


reply via email to

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