diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/file-notify-tests.el | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index c943d91c2d0..17636486153 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el | |||
| @@ -325,12 +325,24 @@ Don't wait longer than TIMEOUT seconds for the events to be delivered." | |||
| 325 | file-notify--test-tmpfile | 325 | file-notify--test-tmpfile |
| 326 | '(attribute-change) 'file-notify--test-event-handler)) | 326 | '(attribute-change) 'file-notify--test-event-handler)) |
| 327 | (file-notify--test-with-events | 327 | (file-notify--test-with-events |
| 328 | (file-notify--test-timeout) '(attribute-changed attribute-changed) | 328 | (file-notify--test-timeout) '(attribute-changed) |
| 329 | (write-region | ||
| 330 | "any text" nil file-notify--test-tmpfile nil 'no-message) | ||
| 331 | (set-file-modes file-notify--test-tmpfile 000) | ||
| 332 | (delete-file file-notify--test-tmpfile)) | ||
| 333 | (file-notify-rm-watch file-notify--test-desc) | ||
| 334 | |||
| 335 | ;; With gfilenotify, there are timing issues with attribute | ||
| 336 | ;; changes in a short time period. So we apply 2 tests. | ||
| 337 | (setq file-notify--test-desc | ||
| 338 | (file-notify-add-watch | ||
| 339 | file-notify--test-tmpfile | ||
| 340 | '(attribute-change) 'file-notify--test-event-handler)) | ||
| 341 | (file-notify--test-with-events | ||
| 342 | (file-notify--test-timeout) '(attribute-changed) | ||
| 329 | (write-region | 343 | (write-region |
| 330 | "any text" nil file-notify--test-tmpfile nil 'no-message) | 344 | "any text" nil file-notify--test-tmpfile nil 'no-message) |
| 331 | (set-file-modes file-notify--test-tmpfile 000) | 345 | (set-file-modes file-notify--test-tmpfile 000) |
| 332 | (read-event nil nil 0.1) ; In order to distinguish the events. | ||
| 333 | (set-file-times file-notify--test-tmpfile '(0 0)) | ||
| 334 | (delete-file file-notify--test-tmpfile)) | 346 | (delete-file file-notify--test-tmpfile)) |
| 335 | (file-notify-rm-watch file-notify--test-desc)) | 347 | (file-notify-rm-watch file-notify--test-desc)) |
| 336 | 348 | ||