Memotoo: Move test '<' and '>' from client-test to imemo20.ics (bug#5635)
Since Memotoo has issue in parsing '<', '>' and client-test.cpp hard-code a case including this character, remove them to make cases passed. To continue check this, I add them into the imemo20.ics test files to keep testing these 2 characters. Also update memotoo's test memo patch.
This commit is contained in:
parent
197020cf43
commit
b45f27367e
|
@ -395,7 +395,13 @@ std::string LocalTests::createItem(int item, const std::string &revision, int si
|
|||
}
|
||||
prop = nextProp + 1;
|
||||
}
|
||||
data.replace(data.find("<<REVISION>>"), strlen("<<REVISION>>"), revision);
|
||||
/** add check for if not found, STL will crash */
|
||||
if(data.find("<<REVISION>>") != std::string::npos) {
|
||||
data.replace(data.find("<<REVISION>>"), strlen("<<REVISION>>"), revision);
|
||||
} else if (data.find("REVISION") != std::string::npos) {
|
||||
/* change "<<REVISION>>" to "REVISION" for memo */
|
||||
data.replace(data.find("REVISION"), strlen("REVISION"), revision);
|
||||
}
|
||||
if (size > 0 && (int)data.size() < size) {
|
||||
int additionalBytes = size - (int)data.size();
|
||||
int added = 0;
|
||||
|
@ -3683,7 +3689,7 @@ void ClientTest::getTestData(const char *type, Config &config)
|
|||
"METHOD:PUBLISH\n"
|
||||
"BEGIN:VJOURNAL\n"
|
||||
"SUMMARY:Summary\n"
|
||||
"DESCRIPTION:Summary\\nBody text<<REVISION>>\n"
|
||||
"DESCRIPTION:Summary\\nBody text REVISION\n"
|
||||
"END:VJOURNAL\n"
|
||||
"END:VCALENDAR\n";
|
||||
config.updateItem =
|
||||
|
|
|
@ -13,7 +13,7 @@ VERSION:2.0
|
|||
METHOD:PUBLISH
|
||||
BEGIN:VJOURNAL
|
||||
SUMMARY:Summary
|
||||
DESCRIPTION:Summary\nBody
|
||||
DESCRIPTION:Summary\nBody <<Revision>>
|
||||
END:VJOURNAL
|
||||
END:VCALENDAR
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
METHOD:PUBLISH
|
||||
BEGIN:VJOURNAL
|
||||
SUMMARY:Summary
|
||||
-DESCRIPTION:Summary\nBody
|
||||
-DESCRIPTION:Summary\nBody <<Revision>>
|
||||
+DESCRIPTION:Summary\nBody Revision
|
||||
END:VJOURNAL
|
||||
END:VCALENDAR
|
||||
|
|
Loading…
Reference in a new issue