Code

t9001: test --envelope-sender option of send-email
authorJunio C Hamano <gitster@pobox.com>
Sun, 22 Nov 2009 17:54:10 +0000 (09:54 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 22 Nov 2009 20:08:44 +0000 (12:08 -0800)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9001-send-email.sh

index fb606a9f05bd6964c588f1ba9e5422e757d12387..0164629ed00e464bab00083a077e194987f69b4c 100755 (executable)
@@ -95,6 +95,23 @@ test_expect_success \
     'Verify commandline' \
     'test_cmp expected commandline1'
 
+test_expect_success 'Send patches with --envelope-sender' '
+    clean_fake_sendmail &&
+     git send-email --envelope-sender="Patch Contributer <patch@example.com>" --suppress-cc=sob --from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
+'
+
+cat >expected <<\EOF
+!patch@example.com!
+!-i!
+!nobody@example.com!
+!author@example.com!
+!one@example.com!
+!two@example.com!
+EOF
+test_expect_success \
+    'Verify commandline' \
+    'test_cmp expected commandline1'
+
 cat >expected-show-all-headers <<\EOF
 0001-Second.patch
 (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'