diff options
| author | Eli Zaretskii | 2015-09-15 15:46:26 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-09-15 15:46:26 +0300 |
| commit | 20b177d54bb0fdc1b478f3c9db88c6afca55b069 (patch) | |
| tree | 616ba259ebd711aaa73ae35ab746dd49c4aa2cb6 /test | |
| parent | 40d3a151c281f841fb2b34a8c4ccdd3a80de908f (diff) | |
| download | emacs-20b177d54bb0fdc1b478f3c9db88c6afca55b069.tar.gz emacs-20b177d54bb0fdc1b478f3c9db88c6afca55b069.zip | |
Fix the file-notify tests for watch validation on w32
* test/automated/file-notify-tests.el
(file-notify-test04-file-validity): Move the directory deletion
out of the file-notify--test-with-events macro.
(file-notify-test04-file-validity)
(file-notify-test05-dir-validity): Enlarge the timeout of
read-event to 0.5, as 0.1 is borderline on w32. (Bug#21432)
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/file-notify-tests.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 3e92925b68a..b962aa7e48f 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el | |||
| @@ -386,17 +386,17 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." | |||
| 386 | '(change) | 386 | '(change) |
| 387 | #'file-notify--test-event-handler)) | 387 | #'file-notify--test-event-handler)) |
| 388 | (file-notify--test-with-events | 388 | (file-notify--test-with-events |
| 389 | 3 3 (lambda (events) | 389 | 2 3 (lambda (events) |
| 390 | (should (equal '(created changed deleted) | 390 | (should (equal '(created changed) |
| 391 | (mapcar #'cadr events)))) | 391 | (mapcar #'cadr events)))) |
| 392 | (should (file-notify-valid-p file-notify--test-desc)) | 392 | (should (file-notify-valid-p file-notify--test-desc)) |
| 393 | (write-region | 393 | (write-region |
| 394 | "any text" nil file-notify--test-tmpfile nil 'no-message) | 394 | "any text" nil file-notify--test-tmpfile nil 'no-message) |
| 395 | (should (file-notify-valid-p file-notify--test-desc)) | 395 | (should (file-notify-valid-p file-notify--test-desc))) |
| 396 | (delete-directory temporary-file-directory t)) | ||
| 397 | ;; After deleting the parent, the descriptor must not be valid | 396 | ;; After deleting the parent, the descriptor must not be valid |
| 398 | ;; anymore. | 397 | ;; anymore. |
| 399 | (should-not (file-notify-valid-p file-notify--test-desc))) | 398 | (delete-directory temporary-file-directory t) |
| 399 | (read-event nil nil 0.5)) | ||
| 400 | 400 | ||
| 401 | ;; Exit. | 401 | ;; Exit. |
| 402 | (file-notify--test-cleanup))) | 402 | (file-notify--test-cleanup))) |
| @@ -420,7 +420,7 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." | |||
| 420 | (delete-directory file-notify--test-tmpfile t) | 420 | (delete-directory file-notify--test-tmpfile t) |
| 421 | ;; After deleting the directory, the descriptor must not be | 421 | ;; After deleting the directory, the descriptor must not be |
| 422 | ;; valid anymore. | 422 | ;; valid anymore. |
| 423 | (read-event nil nil 0.1) | 423 | (read-event nil nil 0.5) |
| 424 | (should-not (file-notify-valid-p file-notify--test-desc))) | 424 | (should-not (file-notify-valid-p file-notify--test-desc))) |
| 425 | 425 | ||
| 426 | ;; Exit. | 426 | ;; Exit. |