diff options
author | Vincent Richard <[email protected]> | 2013-03-24 10:35:08 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-03-24 10:35:08 +0000 |
commit | 495526a5e6c04f2564741a54d791705cdaa268f7 (patch) | |
tree | 5127393755fb27dea0cb7bb9e25da7eef0d5f495 /tests/parser/parameterTest.cpp | |
parent | Checks for a charset in all words of a parameter in a parameterizedHeader. (diff) | |
download | vmime-495526a5e6c04f2564741a54d791705cdaa268f7.tar.gz vmime-495526a5e6c04f2564741a54d791705cdaa268f7.zip |
Let whitespace break the value of a parameterized header field, not just a ';' (thanks to Zarafa).
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 |