diff options
Diffstat (limited to 'tests/parser/textTest.cpp')
-rw-r--r-- | tests/parser/textTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/parser/textTest.cpp b/tests/parser/textTest.cpp index c60da5aa..b84f376c 100644 --- a/tests/parser/textTest.cpp +++ b/tests/parser/textTest.cpp @@ -50,6 +50,8 @@ VMIME_TEST_SUITE_BEGIN VMIME_TEST(testWhitespace) VMIME_TEST(testWhitespaceMBox) + + VMIME_TEST(testFoldingAscii) VMIME_TEST_LIST_END @@ -428,5 +430,17 @@ VMIME_TEST_SUITE_BEGIN VASSERT_EQ("parse.email", "[email protected]", mbox.getEmail()); } + void testFoldingAscii() + { + // In this test, no encoding is needed, but line should be folded anyway + vmime::word w("01234567890123456789012345678901234567890123456789" + "01234567890123456789012345678901234567890123456789", vmime::charset("us-ascii")); + + VASSERT_EQ("fold.ascii", + "=?us-ascii?Q?01234567890123456789012345678901234?=\r\n" + " =?us-ascii?Q?5678901234567890123456789012345678?=\r\n" + " =?us-ascii?Q?9012345678901234567890123456789?=", w.generate(50)); + } + VMIME_TEST_SUITE_END |