aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utility/filteredStreamTest.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2017-03-28 20:31:04 +0000
committerVincent Richard <[email protected]>2017-03-28 20:31:04 +0000
commit604b71356257a6b42e946d9022dcb1e2b056ae3b (patch)
treeea09756eb49332202868c972eb4718a426fbb52e /tests/utility/filteredStreamTest.cpp
parentIssue #167: don't build samples by default. (diff)
downloadvmime-604b71356257a6b42e946d9022dcb1e2b056ae3b.tar.gz
vmime-604b71356257a6b42e946d9022dcb1e2b056ae3b.zip
Issue #168: multiple sequences of 'LF..' not replaced correctly.
Diffstat (limited to 'tests/utility/filteredStreamTest.cpp')
-rw-r--r--tests/utility/filteredStreamTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/utility/filteredStreamTest.cpp b/tests/utility/filteredStreamTest.cpp
index ec1fc66a..cedfab2a 100644
--- a/tests/utility/filteredStreamTest.cpp
+++ b/tests/utility/filteredStreamTest.cpp
@@ -128,6 +128,12 @@ VMIME_TEST_SUITE_BEGIN(filteredStreamTest)
testDotFilteredInputStreamHelper("4", "foo\n.bar", "foo\n..", "bar");
testDotFilteredInputStreamHelper("5", "foo\n.bar", "foo\n", ".", ".bar");
testDotFilteredInputStreamHelper("6", "foo\n.bar", "foo\n", ".", ".", "bar");
+
+ testDotFilteredInputStreamHelper("7", "\x0d\x0a.", "\x0d\x0a..");
+ testDotFilteredInputStreamHelper("8", "\x0d\x0a.\x0d\x0a", "\x0d\x0a..\x0d\x0a");
+ testDotFilteredInputStreamHelper("9", "\x0d\x0a.\x0d\x0a.", "\x0d\x0a..\x0d\x0a.");
+ testDotFilteredInputStreamHelper("10", "\x0d\x0a.\x0d\x0a.\x0d\x0ax", "\x0d\x0a..\x0d\x0a.\x0d\x0ax");
+ testDotFilteredInputStreamHelper("11", "this is the first line\x0d\x0a.\x0d\x0aone dot\x0d\x0a..\x0d\x0atwo dots\x0d\x0a...\x0d\x0athree... \x0d\x0a.\x0d\x0a.\x0d\x0a", "this is the first line\x0d\x0a..\x0d\x0aone dot\x0d\x0a...\x0d\x0atwo dots\x0d\x0a....\x0d\x0athree... \x0d\x0a..\x0d\x0a.\x0d\x0a");
}
// dotFilteredOutputStream
@@ -167,6 +173,8 @@ VMIME_TEST_SUITE_BEGIN(filteredStreamTest)
testFilteredOutputStreamHelper<FILTER>("8", "..\r\nfoobar", ".\r", "\nfoobar");
testFilteredOutputStreamHelper<FILTER>("9", ".foobar", ".foobar");
testFilteredOutputStreamHelper<FILTER>("10", ".foobar", ".", "foobar");
+
+ testFilteredOutputStreamHelper<FILTER>("11", "this is the first line\x0d\x0a...\x0d\x0aone dot\x0d\x0a....\x0d\x0atwo dots\x0d\x0a.....\x0d\x0athree... \x0d\x0a...\x0d\x0a..\x0d\x0a", "this is the first line\x0d\x0a..\x0d\x0aone dot\x0d\x0a...\x0d\x0atwo dots\x0d\x0a....\x0d\x0athree... \x0d\x0a..\x0d\x0a.\x0d\x0a");
}
void testCRLFToLFFilteredOutputStream()