I accidentally dropped "TEXT" handling while porting
the IMAP search query parser to Parse::RecDescent.
This reinstates it and adds a test to prevent future
regression, and the additional test fixes a counting
error for non-Xapian-enabled systems.
# IMAP to Xapian header search key mapping
my %IH2X = (
- TEXT => '',
SUBJECT => 's:',
BODY => 'b:',
FROM => 'f:',
| CC_string
| BCC_string
| SUBJECT_string
+ | TEXT_string
| UID_set
| MSN_set
| sub_query
CC_string : "CC" string { $q->ih2x('CC', $item{string}) }
BCC_string : "BCC" string { $q->ih2x('BCC', $item{string}) }
SUBJECT_string : "SUBJECT" string { $q->ih2x('SUBJECT', $item{string}) }
+TEXT_string : "TEXT" string { $q->ih2x(undef, $item{string}) }
op_subq_enter : '(' { $q->subq_enter }
sub_query : op_subq_enter search_key1(s) ')' { $q->subq_leave }
is(scalar(@$x), 1, 'MSN SEARCH on Subject works after rm');
$x = $mic->message_string($x->[0]);
is($x, $ret->{2}->{RFC822}, 'message 2 unchanged');
+ $x = $mic->search(qw(text embedded));
+ is(scalar(@$x), 1, 'MSN SEARCH on TEXT works after rm');
}
# FIXME? no EXPUNGE response, yet