-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(GODT-1729): Fix SEARCH string arguments
All string argument searches need to be case-insensitive. Optimizations will be handled in GODT-1733.
- Loading branch information
1 parent
3bbbc71
commit 08e67c9
Showing
2 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,11 @@ func TestSearchBcc(t *testing.T) { | |
c.C(`A001 search bcc "[email protected]"`) | ||
c.S("* SEARCH 49 50") | ||
c.OK("A001") | ||
|
||
// Search is also case-insensitive. | ||
c.C(`A001 search bcc "[email protected]"`) | ||
c.S("* SEARCH 49 50") | ||
c.OK("A001") | ||
}) | ||
} | ||
|
||
|
@@ -61,6 +66,11 @@ func TestSearchBody(t *testing.T) { | |
c.C(`A001 search body "Content-Length saves just the size of mail body"`) | ||
c.S("* SEARCH 50") | ||
c.OK("A001") | ||
|
||
// Search is also case-insensitive. | ||
c.C(`A001 search body "Content-LenGTH sAvEs just the size of MaiL body"`) | ||
c.S("* SEARCH 50") | ||
c.OK("A001") | ||
}) | ||
} | ||
|
||
|
@@ -69,6 +79,11 @@ func TestSearchCc(t *testing.T) { | |
c.C(`A001 search cc "Dovecot Mailinglist <[email protected]>"`) | ||
c.S("* SEARCH 53 55 60") | ||
c.OK("A001") | ||
|
||
// Search is also case-insensitive. | ||
c.C(`A001 search cc "DoVeCot Mailinglist <[email protected]>"`) | ||
c.S("* SEARCH 53 55 60") | ||
c.OK("A001") | ||
}) | ||
} | ||
|
||
|
@@ -117,6 +132,10 @@ func TestSearchFrom(t *testing.T) { | |
c.C(`A001 search from "[email protected]"`) | ||
c.S("* SEARCH 5") | ||
c.OK("A001") | ||
|
||
c.C(`A001 search from "[email protected]"`) | ||
c.S("* SEARCH 5") | ||
c.OK("A001") | ||
}) | ||
} | ||
|
||
|
@@ -373,6 +392,11 @@ func TestSearchSubject(t *testing.T) { | |
c.C(`A003 search subject "mbox problems"`) | ||
c.S("* SEARCH 100") | ||
c.OK("A003") | ||
|
||
// Subject search is case-insensitive. | ||
c.C(`A003 search subject "MBOX PROBLEMS"`) | ||
c.S("* SEARCH 100") | ||
c.OK("A003") | ||
}) | ||
} | ||
|
||
|
@@ -387,6 +411,11 @@ func TestSearchText(t *testing.T) { | |
c.C(`A002 search text "Content-Length saves just the size of mail body"`) | ||
c.S("* SEARCH 50") | ||
c.OK("A002") | ||
|
||
// Text search is case-insensitive. | ||
c.C(`A002 search text "ContenT-LeNgTh saveS jUst the Size of mail body"`) | ||
c.S("* SEARCH 50") | ||
c.OK("A002") | ||
}) | ||
} | ||
|
||
|
@@ -395,6 +424,10 @@ func TestSearchTo(t *testing.T) { | |
c.C(`A001 search to "Timo Sirainen <[email protected]>"`) | ||
c.S("* SEARCH 49") | ||
c.OK("A001") | ||
|
||
c.C(`A001 search to "Timo SirAINEN <[email protected]>"`) | ||
c.S("* SEARCH 49") | ||
c.OK("A001") | ||
}) | ||
} | ||
|
||
|