Permalink
Browse files

Added unit test related to PR #192.

  • Loading branch information...
vincent-richard committed Mar 12, 2018
1 parent 754e556 commit abba40e97dabcd56f30f86add8917a7785710d41
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/parser/mailboxTest.cpp
@@ -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

0 comments on commit abba40e

Please sign in to comment.