diff options
Diffstat (limited to 'tests/parser/parameterTest.cpp')
| -rw-r--r-- | tests/parser/parameterTest.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/parser/parameterTest.cpp b/tests/parser/parameterTest.cpp index 91c5f076..3ebd6e35 100644 --- a/tests/parser/parameterTest.cpp +++ b/tests/parser/parameterTest.cpp @@ -24,11 +24,7 @@ #include "tests/testUtils.hpp" -#define VMIME_TEST_SUITE parameterTest -#define VMIME_TEST_SUITE_MODULE "Parser" - - -VMIME_TEST_SUITE_BEGIN +VMIME_TEST_SUITE_BEGIN(parameterTest) VMIME_TEST_LIST_BEGIN VMIME_TEST(testParse) @@ -39,6 +35,7 @@ VMIME_TEST_SUITE_BEGIN VMIME_TEST(testParseNonSignificantWS) VMIME_TEST(testEncodeTSpecials) VMIME_TEST(testEncodeTSpecialsInRFC2231) + VMIME_TEST(testWhitespaceBreaksTheValue) VMIME_TEST_LIST_END @@ -352,5 +349,16 @@ VMIME_TEST_SUITE_BEGIN 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 |
