diff options
author | Eric Wong <e@yhbt.net> | 2020-06-27 10:03:51 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-28 22:27:27 +0000 |
commit | 204e451851dfe510e16cc03e4a6ea6242c4e9076 (patch) | |
tree | 344ad4b7e66ab02188071dcd5d09a7cd96f89b51 /t/watch_maildir.t | |
parent | 62e3ea11522242c651ea4991712f040ab460223d (diff) | |
download | public-inbox-204e451851dfe510e16cc03e4a6ea6242c4e9076.tar.gz |
Since we store all watched directory names as keys in %mdmap, there should be no need to keep an array of those directories around. t/watch_maildir*.t required changes to remove trained spam. Once we've trained something as spam, there shouldn't be a need to rescan it.
Diffstat (limited to 't/watch_maildir.t')
-rw-r--r-- | t/watch_maildir.t | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/watch_maildir.t b/t/watch_maildir.t index c8658140..c44273f0 100644 --- a/t/watch_maildir.t +++ b/t/watch_maildir.t @@ -84,6 +84,7 @@ PublicInbox::WatchMaildir->new($config)->scan('full'); is(scalar @list, 2, 'two revisions in rev-list'); @list = $git->qx(qw(ls-tree -r --name-only refs/heads/master)); is(scalar @list, 0, 'tree is empty'); +is(unlink(glob("$spamdir/cur/*")), 1, 'unlinked trained spam'); # check with scrubbing { @@ -105,6 +106,7 @@ More majordomo info at http://vger.kernel.org/majordomo-info.html\n); is(scalar @list, 0, 'tree is empty'); @list = $git->qx(qw(rev-list refs/heads/master)); is(scalar @list, 4, 'four revisions in rev-list'); + is(unlink(glob("$spamdir/cur/*")), 1, 'unlinked trained spam'); } { |