From e8cb19f9e57963e00fa90764e2a556ebb4d49407 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 12 Oct 2010 09:45:16 +0000 Subject: Encode quotation marks in QP/RFC-2047. --- tests/parser/textTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/parser/textTest.cpp') diff --git a/tests/parser/textTest.cpp b/tests/parser/textTest.cpp index 4a7e394f..b455d919 100644 --- a/tests/parser/textTest.cpp +++ b/tests/parser/textTest.cpp @@ -46,6 +46,7 @@ VMIME_TEST_SUITE_BEGIN VMIME_TEST(testWordGenerateMultiBytes) VMIME_TEST(testWordGenerateQuote) VMIME_TEST(testWordGenerateSpecialCharsets) + VMIME_TEST(testWordGenerateSpecials) VMIME_TEST_LIST_END @@ -370,5 +371,12 @@ VMIME_TEST_SUITE_BEGIN vmime::charset("iso-2022-jp")).generate(100))); } + void testWordGenerateSpecials() + { + // In RFC-2047, quotation marks (ASCII 22h) should be encoded + VASSERT_EQ("1", "=?UTF-8?Q?=22=C3=9Cml=C3=A4ute=22?=", + vmime::word("\x22\xC3\x9Cml\xC3\xA4ute\x22", vmime::charset("UTF-8")).generate()); + } + VMIME_TEST_SUITE_END -- cgit v1.2.3