aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorCalvin Rose <calsrose@gmail.com>2024-08-18 16:25:47 -0500
committerCalvin Rose <calsrose@gmail.com>2024-08-18 16:25:47 -0500
commit9e334da2d63d3375c5d993a18ab3d5f8d1fa32b6 (patch)
tree4d89901bfa11367cbb9f92cec5800021363e9651 /test
parentfilewatch on mingw has same semantics as windows (diff)
Exit early when filewatch is not supported.
Currently we have no poll implementation.
Diffstat (limited to 'test')
-rw-r--r--test/suite-filewatch.janet6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/suite-filewatch.janet b/test/suite-filewatch.janet
index fa106396..4981e106 100644
--- a/test/suite-filewatch.janet
+++ b/test/suite-filewatch.janet
@@ -27,6 +27,12 @@
(def is-win (or (= :mingw (os/which)) (= :windows (os/which))))
(def is-linux (= :linux (os/which)))
+# If not supported, exit early
+(def [supported msg] (protect (filewatch/new chan)))
+(when (and (not supported) (string/find "filewatch not supported" msg))
+ (end-suite)
+ (quit))
+
# Test GC
(assert-no-error "filewatch/new" (filewatch/new chan))
(gccollect)