\@docids;
}
-# TODO: move this to MdirReader, maybe...
-# cf: https://cr.yp.to/proto/maildir.html
-my %c2kw = ('D' => 'draft', F => 'flagged', R => 'answered', S => 'seen');
-sub maildir_keywords {
- $_[-1] =~ /:2,([A-Z]+)\z/i ?
- sort(map { $c2kw{$_} // () } split(//, $1)) : ();
-}
-
sub add_eml {
my ($self, $eml, @kw) = @_;
my $im = $self->importer; # may create new epoch
my $eml = eml_load('t/data/0001.patch');
is($sto->add_eml($eml), undef, 'idempotent');
$sto->done;
-is_deeply([$sto->maildir_keywords('/foo:2,')], [], 'Maildir no keywords');
-is_deeply([$sto->maildir_keywords('/foo:2,S')], ['seen'], 'Maildir seen');
-is_deeply([$sto->maildir_keywords('/foo:2,RS')], ['answered', 'seen'],
- 'Maildir answered + seen');
-is_deeply([$sto->maildir_keywords('/foo:2,RSZ')], ['answered', 'seen'],
- 'Maildir answered + seen w/o Z');
{
my $es = $sto->search;
my $msgs = $es->over->query_xover(0, 1000);