From: Baptiste Daroussin Date: Fri, 31 May 2024 08:54:46 +0000 (+0200) Subject: test: add a unit test about #30 X-Git-Tag: RELEASE_1_4_6~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e36f595dd2e8fe08e124ab53167255e3c38792b;p=thirdparty%2Fmlmmj.git test: add a unit test about #30 --- diff --git a/tests/mlmmj-receive.in b/tests/mlmmj-receive.in index 5d824f96..f3cb823a 100644 --- a/tests/mlmmj-receive.in +++ b/tests/mlmmj-receive.in @@ -5,6 +5,7 @@ tests_init \ basics \ simple \ + simple \ subscribe \ subscribe_digest \ subscribe_nomail \ @@ -25,7 +26,8 @@ tests_init \ normal_email \ delheaders \ customheaders \ - verp + verp \ + normal_email_with_dot mlmmjreceive=$(command -v mlmmj-receive) @@ -2880,3 +2882,66 @@ EOF atf_check -o file:expected-3.txt sed -e "/^Message-ID:/d; /^Date:/d;" mail-3.txt atf_check -s exit:1 test -f mail-4.txt } + +normal_email_with_dot_body() +{ + atf_check $top_builddir/tests/fakesmtpd + trap kill_fakesmtp EXIT TERM + init_ml list + rmdir list/text + ln -s ${top_srcdir}/listtexts/en list/text + echo test@mlmmjtest > list/control/listaddress + echo "25678" > list/control/smtpport + echo "heloname" > list/control/smtphelo + + printf "user@test\nuser2@test" > list/subscribers.d/u +cat > first < nosubject <> expected-1.txt < +RCPT TO: +DATA +From: bob@test +To: test@mlmmjtest +Subject: yeah + +Hello +.world + +. +MAIL FROM: +RCPT TO: +DATA +From: bob@test +To: test@mlmmjtest +Subject: yeah + +Hello +.world + +. +QUIT +EOF + atf_check -o file:expected-1.txt sed -e "/^Message-ID:/d; /^Date:/d;" mail-1.txt + touch list/control/footer + atf_check -s exit:0 $mlmmjreceive -L list -F