aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/mailboxTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2018-03-12 19:33:27 +0000
committerVincent Richard <[email protected]>2018-03-12 19:33:27 +0000
commitabba40e97dabcd56f30f86add8917a7785710d41 (patch)
tree5bf95fbf723236fc2d545a85680ac91b1dee78be /tests/parser/mailboxTest.cpp
parentMerge pull request #192 from bosim/address-parsing (diff)
downloadvmime-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.cpp10
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;
+
+ VASSERT_EQ("name", vmime::text("[email protected]"), mbox.getName());
+ VASSERT_EQ("email", "[email protected]", mbox.getEmail());
+ }
+
VMIME_TEST_SUITE_END