aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/textTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2010-10-18 14:20:34 +0000
committerVincent Richard <[email protected]>2010-10-18 14:20:34 +0000
commitdbcb03893cd3d85914e277e0406d1703cfb61b06 (patch)
tree03db15b3f01b15942ac899ef26ddccb780d7f916 /tests/parser/textTest.cpp
parentFixed missing whitespace in text parsing. (diff)
downloadvmime-dbcb03893cd3d85914e277e0406d1703cfb61b06.tar.gz
vmime-dbcb03893cd3d85914e277e0406d1703cfb61b06.zip
Fold non-encoded lines in the case there is no whitespace in them.
Diffstat (limited to 'tests/parser/textTest.cpp')
-rw-r--r--tests/parser/textTest.cpp14
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