diff options
Diffstat (limited to 'tests/parser/mailboxTest.cpp')
-rw-r--r-- | tests/parser/mailboxTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/parser/mailboxTest.cpp b/tests/parser/mailboxTest.cpp index 6bf6670c..92fcd98f 100644 --- a/tests/parser/mailboxTest.cpp +++ b/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", "[email protected]", mbox2->getEmail()); } + void testAddressInName() + { + vmime::mailbox mbox; + mbox.parse("[email protected] <[email protected]>"); + + VASSERT_EQ("name", vmime::text("[email protected]"), mbox.getName()); + VASSERT_EQ("email", "[email protected]", mbox.getEmail()); + } + VMIME_TEST_SUITE_END |