From dbcb03893cd3d85914e277e0406d1703cfb61b06 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 18 Oct 2010 14:20:34 +0000 Subject: Fold non-encoded lines in the case there is no whitespace in them. --- tests/parser/textTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/parser/textTest.cpp') 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", "me@vmime.org", 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 -- cgit v1.2.3