From 03a0e36e91070a1bcfb13babaaefec4ea258723e Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 30 Jun 2014 22:48:42 +0200 Subject: Added support for language specification in RFC-2047 encoded words and RFC-2231 parameter values. --- tests/parser/textTest.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/parser/textTest.cpp') diff --git a/tests/parser/textTest.cpp b/tests/parser/textTest.cpp index f56f972d..58d5bff5 100644 --- a/tests/parser/textTest.cpp +++ b/tests/parser/textTest.cpp @@ -221,12 +221,21 @@ VMIME_TEST_SUITE_BEGIN(textTest) VASSERT_EQ("6", "[text: [[word: charset=iso-8859-1, buffer=Know wh\xe4t? It works!]]]", parseText("=?iso-8859-1?Q?Know_wh=E4t?_It_works!?=")); - // TODO: add more + // With language specifier + VASSERT_EQ("7", "[text: [[word: charset=US-ASCII, buffer=Keith Moore, lang=EN]]]", + parseText("=?US-ASCII*EN?Q?Keith_Moore?=")); } void testGenerate() { // TODO + + // With language specifier + vmime::word wlang1("Émeline", vmime::charset("UTF-8"), "FR"); + VASSERT_EQ("lang1", "=?UTF-8*FR?Q?=C3=89meline?=", wlang1.generate()); + + vmime::word wlang2("Keith Moore", vmime::charset("US-ASCII"), "EN"); + VASSERT_EQ("lang2", "=?US-ASCII*EN?Q?Keith_Moore?=", wlang2.generate()); } void testDisplayForm() -- cgit v1.2.3