Added unit test related to PR #192.
This commit is contained in:
parent
754e556aeb
commit
abba40e97d
@ -30,6 +30,7 @@ VMIME_TEST_SUITE_BEGIN(mailboxTest)
|
||||
VMIME_TEST(testParse)
|
||||
VMIME_TEST(testEmptyEmailAddress)
|
||||
VMIME_TEST(testSeparatorInComment)
|
||||
VMIME_TEST(testAddressInName)
|
||||
VMIME_TEST_LIST_END
|
||||
|
||||
|
||||
@ -145,5 +146,14 @@ VMIME_TEST_SUITE_BEGIN(mailboxTest)
|
||||
VASSERT_EQ("email2", "bbb@vmime.org", mbox2->getEmail());
|
||||
}
|
||||
|
||||
void testAddressInName()
|
||||
{
|
||||
vmime::mailbox mbox;
|
||||
mbox.parse("a@b.c <e@f.g>");
|
||||
|
||||
VASSERT_EQ("name", vmime::text("a@b.c"), mbox.getName());
|
||||
VASSERT_EQ("email", "e@f.g", mbox.getEmail());
|
||||
}
|
||||
|
||||
VMIME_TEST_SUITE_END
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user