1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

IMAP: fix regression in NOT DELETED filter

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1370 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-08-21 23:40:24 +00:00
parent 64a377c43d
commit 02d66e3b88
2 changed files with 5 additions and 3 deletions

View File

@ -1011,7 +1011,7 @@ public class ImapConnection extends AbstractConnection {
protected ExchangeSession.Condition appendSearchParam(StringTokenizer tokens, String token, SearchConditions conditions) throws IOException {
if ("NOT".equals(token)) {
String nextToken = tokens.nextToken();
if ("DELETED".equals(token)) {
if ("DELETED".equals(nextToken)) {
// conditions.deleted = Boolean.FALSE;
return session.isNull("deleted");
} else {

View File

@ -103,12 +103,14 @@ public class TestImap extends AbstractDavMailTestCase {
readFullAnswer(".");
}
public void testUidSearchDeleted() throws IOException {
public void testUidSearchUnDeleted() throws IOException {
writeLine(". UID SEARCH UNDELETED");
assertEquals(". OK SEARCH completed", readFullAnswer("."));
writeLine(". UID SEARCH NOT DELETED");
assertEquals(". OK SEARCH completed", readFullAnswer("."));
}
public void testUidSearchUndeleted() throws IOException {
public void testUidSearchdeleted() throws IOException {
writeLine(". UID SEARCH DELETED");
assertEquals(". OK SEARCH completed", readFullAnswer("."));
}