2 # Copyright (C) all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 use v5.12; use PublicInbox::TestCommon;
5 plan skip_all => 'inotify is Linux-only' if $^O ne 'linux';
6 use_ok 'PublicInbox::Inotify3';
7 my $in = PublicInbox::Inotify3->new;
9 my $w = $in->watch("$tmpdir", PublicInbox::Inotify3::IN_ALL_EVENTS());
11 is_xdeeply [ $in->read ], [], 'non-blocking has no events, yet';
14 ok scalar(@list), 'got events';
15 ok $w->cancel, 'watch canceled';