+
+ SKIP: {
+ $ino_fdinfo or skip 'Linux/inotify-only watch check', 1;
+ open my $fh, '<', $ino_fdinfo or xbail "open $ino_fdinfo: $!";
+ my $cmp = [ <$fh> ];
+ ok(scalar(@$cmp) > scalar(@$ino_contents),
+ 'inotify has Maildir watches');
+ }
+
+ lei_ok 'rm-watch', $md;
+ lei_ok 'ls-watch', \'refresh watches';
+ is($lei_out, '', 'no watches left');
+
+ lei_ok 'add-watch', $md2;
+ remove_tree($md2);
+ lei_ok 'rm-watch', "maildir:".$md2, \'with maildir: prefix';
+ lei_ok 'ls-watch', \'refresh watches';
+ is($lei_out, '', 'no watches left');
+
+ lei_ok 'add-watch', $md;
+ remove_tree($md);
+ lei_ok 'rm-watch', $md, \'absolute path w/ missing dir';
+ lei_ok 'ls-watch', \'refresh watches';
+ is($lei_out, '', 'no watches left');
+
+ SKIP: {
+ $ino_fdinfo or skip 'Linux/inotify-only removal removal', 1;
+ open my $fh, '<', $ino_fdinfo or xbail "open $ino_fdinfo: $!";
+ my $cmp = [ <$fh> ];
+ is_xdeeply($cmp, $ino_contents, 'inotify Maildir watches gone');
+ };