X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/880f5c3a2c6315b73ecb54f2ec4c1a71bb9d6741..8ba186801a31551de4f12ffd26b617a02b289d32:/test/post/test-mhmail diff --git a/test/post/test-mhmail b/test/post/test-mhmail index 08df5577..17c95054 100755 --- a/test/post/test-mhmail +++ b/test/post/test-mhmail @@ -56,6 +56,7 @@ test_mhmail () # sed -e 's/^Date:.*/Date:/' \ + -e 's/^Resent-Date:.*/Resent-Date:/' \ -e 's/^Message-ID:.*/Message-ID:/' "$actual" > "$actual".nodate rm -f "$actual" @@ -77,6 +78,7 @@ Usage: mhmail [addrs ... [switches]] -c(c) addrs ... -f(rom) addr -s(ubject) text + -r(esent) -pr(ofile) -v(ersion) -h(elp) @@ -578,4 +580,35 @@ test_mhmail "$expected" "-from sender@localhost" -b "here's some text [ ${failed:-0} -eq 0 ] || exit ${failed:-0} +# check -resent +# Verified same behavior as compiled mhmail. +cat > "$expected" < +RCPT TO: +DATA +Resent-To: recipient@example.com +Resent-From: recipient@example.com +To: recipient@example.com +From: sender@localhost +Date: +Resent-Date: + +please resend this message + +. +QUIT +EOF + +test_mhmail "$expected" "-from recipient@example.com -resent" \ + -b "To: recipient@example.com +From: sender@localhost +Date: Sat Jun 16 18:35:15 -0500 + +please resend this message +" + +[ ${failed:-0} -eq 0 ] || exit ${failed:-0} + + exit ${failed:-0}