From 604b71356257a6b42e946d9022dcb1e2b056ae3b Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 28 Mar 2017 22:31:04 +0200 Subject: Issue #168: multiple sequences of 'LF..' not replaced correctly. --- tests/utility/filteredStreamTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') 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("8", "..\r\nfoobar", ".\r", "\nfoobar"); testFilteredOutputStreamHelper("9", ".foobar", ".foobar"); testFilteredOutputStreamHelper("10", ".foobar", ".", "foobar"); + + testFilteredOutputStreamHelper("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() -- cgit v1.2.3