diff options
author | Vincent Richard <[email protected]> | 2018-03-12 19:33:27 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2018-03-12 19:33:27 +0000 |
commit | abba40e97dabcd56f30f86add8917a7785710d41 (patch) | |
tree | 5bf95fbf723236fc2d545a85680ac91b1dee78be /tests/parser/mailboxTest.cpp | |
parent | Merge pull request #192 from bosim/address-parsing (diff) | |
download | vmime-abba40e97dabcd56f30f86add8917a7785710d41.tar.gz vmime-abba40e97dabcd56f30f86add8917a7785710d41.zip |
Added unit test related to PR #192.
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 |