From dba02c673e89d51f89f192e52bbc3450136cf649 Mon Sep 17 00:00:00 2001 From: Daniel Jagszent Date: Thu, 28 Dec 2023 17:32:16 +0100 Subject: [PATCH] chore: add test for the CrLfToLfTransformer fix --- milterutil/transformer_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/milterutil/transformer_test.go b/milterutil/transformer_test.go index d598583..2dcb74e 100644 --- a/milterutil/transformer_test.go +++ b/milterutil/transformer_test.go @@ -93,6 +93,8 @@ func TestCrLfToLfTransformer(t *testing.T) { {[]string{"\r", "\n"}, "\n"}, {[]string{"\r\r", "\n"}, "\n\n"}, {[]string{stuffing + "123456\r", "\n"}, stuffing + "123456\n"}, + // regression https://github.com/d--j/go-milter/pull/20 + {[]string{"aaaaaaaaaaaaaaaaaaaaaaaa\r\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r\nbbbbbbb"}, "aaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nbbbbbbb"}, }) }