diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2016-02-21 09:58:55 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2016-02-21 09:58:55 +0100 |
commit | 5baa001cecbeb3081fb8a9293d45cfe9f19ef844 (patch) | |
tree | ea0dcbb2928afdcae93631b22b31c0c3b7a949ff /test | |
parent | 72613557e02d493f195a1c0894ec736b19069f4c (diff) | |
download | emacs-5baa001cecbeb3081fb8a9293d45cfe9f19ef844.tar.gz |
Fix Bug#22736
* lisp/filenotify.el (file-notify-callback): Use the proper
descriptor when calling the callback. (Bug#22736)
* test/automated/file-notify-tests.el
(file-notify--test-event-handler): Deactivate trace.
(file-notify-test08-watched-file-in-watched-dir): Bind
`file-notify--test-tmpfile' temporarily in `dir-callback'.
Diffstat (limited to 'test')
-rw-r--r-- | test/automated/file-notify-tests.el | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el index 346120e276c..ac33d680a10 100644 --- a/test/automated/file-notify-tests.el +++ b/test/automated/file-notify-tests.el @@ -281,8 +281,8 @@ and the event to `file-notify--test-events'." (unless (string-match (regexp-quote ".#") (file-notify--event-file-name file-notify--test-event)) - (message "file-notify--test-event-handler result: %s event: %S" - (null (ert-test-failed-p result)) file-notify--test-event) + ;;(message "file-notify--test-event-handler result: %s event: %S" + ;;(null (ert-test-failed-p result)) file-notify--test-event) (setq file-notify--test-events (append file-notify--test-events `(,file-notify--test-event)) file-notify--test-results @@ -963,11 +963,11 @@ the file watch." (let ((temporary-file-directory file-notify--test-tmpfile)) (make-temp-file "file"))) (cl-flet ((dir-callback (event) - (message "dir-callback %s" event) - (let ((file-notify--test-desc file-notify--test-desc1)) + (let ((file-notify--test-desc file-notify--test-desc1) + (file-notify--test-tmpfile + (file-notify--event-file-name event))) (file-notify--test-event-handler event))) (file-callback (event) - (message "file-callback %s" event) (let ((file-notify--test-desc file-notify--test-desc2)) (file-notify--test-event-handler event)))) (should @@ -989,7 +989,6 @@ the file watch." "any text" nil file-notify--test-tmpfile1 t 'no-message) (let ((temporary-file-directory file-notify--test-tmpfile)) (make-temp-file "fileX")))) - ;; After saving the buffer, the descriptor is still valid. (should (file-notify-valid-p file-notify--test-desc1)) (should (file-notify-valid-p file-notify--test-desc2)) (delete-file file-notify--test-tmpfile1) |