aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/inotify-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/src/inotify-tests.el b/test/src/inotify-tests.el
index f30aecc9c4f..987e1fc0777 100644
--- a/test/src/inotify-tests.el
+++ b/test/src/inotify-tests.el
@@ -28,6 +28,13 @@
28(declare-function inotify-add-watch "inotify.c" (file-name aspect callback)) 28(declare-function inotify-add-watch "inotify.c" (file-name aspect callback))
29(declare-function inotify-rm-watch "inotify.c" (watch-descriptor)) 29(declare-function inotify-rm-watch "inotify.c" (watch-descriptor))
30 30
31(ert-deftest inotify-valid-p-simple ()
32 "Simple tests for `inotify-valid-p'."
33 (skip-unless (featurep 'inotify))
34 (should-not (inotify-valid-p 0))
35 (should-not (inotify-valid-p nil))
36 (should-not (inotify-valid-p '(0 . 0))))
37
31;; (ert-deftest filewatch-file-watch-aspects-check () 38;; (ert-deftest filewatch-file-watch-aspects-check ()
32;; "Test whether `file-watch' properly checks the aspects." 39;; "Test whether `file-watch' properly checks the aspects."
33;; (let ((temp-file (make-temp-file "filewatch-aspects"))) 40;; (let ((temp-file (make-temp-file "filewatch-aspects")))
@@ -56,7 +63,9 @@
56 (insert "Foo\n")) 63 (insert "Foo\n"))
57 (read-event nil nil 5) 64 (read-event nil nil 5)
58 (should (> events 0))) 65 (should (> events 0)))
66 (should (inotify-valid-p wd))
59 (inotify-rm-watch wd) 67 (inotify-rm-watch wd)
68 (should-not (inotify-valid-p wd))
60 (delete-file temp-file))))) 69 (delete-file temp-file)))))
61 70
62(provide 'inotify-tests) 71(provide 'inotify-tests)