@matheusbsbs / matheus-bagliano / commits / 4f333bc1d3
Fork 0

t9001: test --envelope-sender option of send-email

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Nov 22, 2009 at 09:54 UTC 4f333bc1d32a84c9ddad737ccdbd6e99ed05d396
1 file changed +17
t/t9001-send-email.sh
+17
@@ -95,6 +95,23 @@ test_expect_success \
95 'Verify commandline' \
96 'test_cmp expected commandline1'
97
98 +test_expect_success 'Send patches with --envelope-sender' '
99 + clean_fake_sendmail &&
100 + 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
101 +'
102 +
103 +cat >expected <<\EOF
104 +!patch@example.com!
105 +!-i!
106 +!nobody@example.com!
107 +!author@example.com!
108 +!one@example.com!
109 +!two@example.com!
110 +EOF
111 +test_expect_success \
112 + 'Verify commandline' \
113 + 'test_cmp expected commandline1'
114 +
115 cat >expected-show-all-headers <<\EOF
116 0001-Second.patch
117 (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'