From 0aa48e801c7093e3270c7e22042aa7ff74ce939b Mon Sep 17 00:00:00 2001 Message-Id: <0aa48e801c7093e3270c7e22042aa7ff74ce939b.1747008047.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 8 Nov 2008 21:34:52 +0000 Subject: [PATCH] Refresh of remove-e-mail-address-duplicat Organization: Straylight/Edgeware From: Catalin Marinas --- t/t1900-mail.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/t/t1900-mail.sh b/t/t1900-mail.sh index cfdc6f3..cea6769 100755 --- a/t/t1900-mail.sh +++ b/t/t1900-mail.sh @@ -47,4 +47,37 @@ test_expect_success \ [ "$t1" = "$t2" ] ' +test_expect_success \ + 'Check the To:, Cc: and Bcc: headers' \ + ' + stg mail --to=a@a --cc="b@b, c@c" --bcc=d@d $(stg top) -m \ + -t ../../templates/patchmail.tmpl > mbox && + test "$(cat mbox | grep -e "^To:")" = "To: a@a" && + test "$(cat mbox | grep -e "^Cc:")" = "Cc: b@b, c@c" && + test "$(cat mbox | grep -e "^Bcc:")" = "Bcc: d@d" + ' + +test_expect_success \ + 'Check the --auto option' \ + ' + stg edit --sign && + stg mail --to=a@a --cc="b@b, c@c" --bcc=d@d --auto $(stg top) -m \ + -t ../../templates/patchmail.tmpl > mbox && + test "$(cat mbox | grep -e "^To:")" = "To: a@a" && + test "$(cat mbox | grep -e "^Cc:")" = \ + "Cc: C O Mitter , b@b, c@c" && + test "$(cat mbox | grep -e "^Bcc:")" = "Bcc: d@d" + ' + +test_expect_success \ + 'Check the e-mail address duplicates' \ + ' + stg mail --to="a@a, b b " --cc="b@b, c@c" \ + --bcc="c@c, d@d, committer@example.com" --auto $(stg top) -m \ + -t ../../templates/patchmail.tmpl > mbox && + test "$(cat mbox | grep -e "^To:")" = "To: b b , a@a" && + test "$(cat mbox | grep -e "^Cc:")" = "Cc: c@c" && + test "$(cat mbox | grep -e "^Bcc:")" = "Bcc: committer@example.com, d@d" + ' + test_done -- [mdw]