diff options
| author | Po Lu | 2025-02-26 09:56:46 +0800 |
|---|---|---|
| committer | Po Lu | 2025-02-26 10:39:46 +0800 |
| commit | 928dc34e05fc04a9b8394df477beca2ef6d9fd1b (patch) | |
| tree | 49155540107962e0bafe822ac01aa87b85dc6707 /test/src | |
| parent | 68f9a7aac1f5b9606ca6245e1dd74d09087752d4 (diff) | |
| download | emacs-928dc34e05fc04a9b8394df477beca2ef6d9fd1b.tar.gz emacs-928dc34e05fc04a9b8394df477beca2ef6d9fd1b.zip | |
Guarantee delivery of inotify special events
* src/inotify.c (inotifyevent_to_event): Always match events
that are not encompassed by IN_ALL_EVENTS and which the
documentation implies are always delivered to callbacks.
* test/src/inotify-tests.el (inotify-file-watch-stop-delivery):
New test.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/inotify-tests.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/inotify-tests.el b/test/src/inotify-tests.el index 23febef2c67..aa7801d1e2c 100644 --- a/test/src/inotify-tests.el +++ b/test/src/inotify-tests.el | |||
| @@ -67,6 +67,17 @@ | |||
| 67 | (inotify-rm-watch wd) | 67 | (inotify-rm-watch wd) |
| 68 | (should-not (inotify-valid-p wd))))))) | 68 | (should-not (inotify-valid-p wd))))))) |
| 69 | 69 | ||
| 70 | (ert-deftest inotify-file-watch-stop-delivery () | ||
| 71 | "Test whether IN_IGNORE events are delivered." | ||
| 72 | (skip-unless (featurep 'inotify)) | ||
| 73 | (progn | ||
| 74 | (ert-with-temp-file temp-file | ||
| 75 | (inotify-add-watch | ||
| 76 | temp-file t (lambda (event) | ||
| 77 | (when (memq 'ignored (cadr event)) | ||
| 78 | (throw 'success t))))) | ||
| 79 | (should (catch 'success (recursive-edit) nil)))) | ||
| 80 | |||
| 70 | (provide 'inotify-tests) | 81 | (provide 'inotify-tests) |
| 71 | 82 | ||
| 72 | ;;; inotify-tests.el ends here | 83 | ;;; inotify-tests.el ends here |