diff options
Diffstat (limited to 'tests/parser/parameterTest.cpp')
-rw-r--r-- | tests/parser/parameterTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/parser/parameterTest.cpp b/tests/parser/parameterTest.cpp index eb3a663a..3ebd6e35 100644 --- a/tests/parser/parameterTest.cpp +++ b/tests/parser/parameterTest.cpp @@ -35,6 +35,7 @@ VMIME_TEST_SUITE_BEGIN(parameterTest) VMIME_TEST(testParseNonSignificantWS) VMIME_TEST(testEncodeTSpecials) VMIME_TEST(testEncodeTSpecialsInRFC2231) + VMIME_TEST(testWhitespaceBreaksTheValue) VMIME_TEST_LIST_END @@ -348,5 +349,16 @@ VMIME_TEST_SUITE_BEGIN(parameterTest) vmime::create <vmime::parameter>("filename", "my_file_name_\xc3\xb6\xc3\xa4\xc3\xbc_(1).txt")->generate()); } + void testWhitespaceBreaksTheValue() + { + parameterizedHeaderField p; + p.parse("xxx yyy; param1=value1 \r\n"); + + VASSERT_EQ("count", 1, p.getParameterCount()); + VASSERT_EQ("value", "xxx", FIELD_VALUE(p)); + VASSERT_EQ("param1.name", "param1", PARAM_NAME(p, 0)); + VASSERT_EQ("param1.value", "value1", PARAM_VALUE(p, 0)); + } + VMIME_TEST_SUITE_END |