aboutsummaryrefslogtreecommitdiffstats
path: root/tests/parser/textTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2010-10-12 09:45:16 +0000
committerVincent Richard <[email protected]>2010-10-12 09:45:16 +0000
commite8cb19f9e57963e00fa90764e2a556ebb4d49407 (patch)
treed9ea146abe0f11c6464406457652620ac5db6529 /tests/parser/textTest.cpp
parentAdded an option to recognize inline objects as attachments. (diff)
downloadvmime-e8cb19f9e57963e00fa90764e2a556ebb4d49407.tar.gz
vmime-e8cb19f9e57963e00fa90764e2a556ebb4d49407.zip
Encode quotation marks in QP/RFC-2047.
Diffstat (limited to 'tests/parser/textTest.cpp')
-rw-r--r--tests/parser/textTest.cpp8
1 files changed, 8 insertions, 0 deletions
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