aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/mailboxListTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parser/mailboxListTest.cpp')
-rw-r--r--tests/parser/mailboxListTest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/parser/mailboxListTest.cpp b/tests/parser/mailboxListTest.cpp
index 7505acd9..2036863d 100644
--- a/tests/parser/mailboxListTest.cpp
+++ b/tests/parser/mailboxListTest.cpp
@@ -28,6 +28,7 @@ VMIME_TEST_SUITE_BEGIN(mailboxListTest)
VMIME_TEST_LIST_BEGIN
VMIME_TEST(testParseGroup)
+ VMIME_TEST(testBrokenGroup)
VMIME_TEST_LIST_END
@@ -44,4 +45,18 @@ VMIME_TEST_SUITE_BEGIN(mailboxListTest)
VASSERT_EQ("email", "[email protected]", mboxList.getMailboxAt(2)->getEmail().generate());
}
+ void testBrokenGroup() {
+
+ std::string bad(":,");
+
+ for (int i = 0 ; i < 10 ; ++i) {
+ bad = bad + bad;
+ }
+
+ vmime::mailboxList mboxList;
+ mboxList.parse(bad);
+
+ VASSERT_EQ("count", 0, mboxList.getMailboxCount());
+ }
+
VMIME_TEST_SUITE_END