Added test.

This commit is contained in:
vincent-richard 2020-06-02 18:13:34 +02:00
parent 16912a5ed7
commit 9a10a839ec

View File

@ -31,6 +31,7 @@ VMIME_TEST_SUITE_BEGIN(mailboxGroupTest)
VMIME_TEST(testParseNoEndDelimiter)
VMIME_TEST(testParseExtraChars)
VMIME_TEST(testEmptyGroup)
VMIME_TEST(testEncodedEmptyGroup)
VMIME_TEST_LIST_END
@ -94,4 +95,13 @@ VMIME_TEST_SUITE_BEGIN(mailboxGroupTest)
VASSERT_EQ("count", 0, mgrp.getMailboxCount());
}
void testEncodedEmptyGroup() {
vmime::mailboxGroup mgrp;
mgrp.parse("=?us-ascii?Q?Undisclosed_recipients?=:;");
VASSERT_EQ("name", "Undisclosed recipients", mgrp.getName().getWholeBuffer());
VASSERT_EQ("count", 0, mgrp.getMailboxCount());
}
VMIME_TEST_SUITE_END