diff options
| author | ruki <[email protected]> | 2022-07-23 00:41:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-07-23 00:41:45 +0800 |
| commit | 08f1f473ba31ac3720c3ecf3cc5afac04947eab6 (patch) | |
| tree | bc35b7bdcb7147b2c820203a51a08d6d5b879a2c /tests/modules/fwatcher/watchdir.lua | |
| parent | 8cb0768ed29c7ea78cd27fdd3febc66c2d2ddce9 (diff) | |
add tests
Diffstat (limited to 'tests/modules/fwatcher/watchdir.lua')
| -rw-r--r-- | tests/modules/fwatcher/watchdir.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/modules/fwatcher/watchdir.lua b/tests/modules/fwatcher/watchdir.lua new file mode 100644 index 000000000..d73d7ff9f --- /dev/null +++ b/tests/modules/fwatcher/watchdir.lua @@ -0,0 +1,11 @@ +import("core.base.fwatcher") + +function main(watchdir) + fwatcher.add(watchdir) + while true do + local ok, event = fwatcher.wait(-1) + if ok > 0 then + print(event) + end + end +end |
