t/send-email: add test with quoted sender

add test where sender address needs to be quoted. Make sure --suppress-cc=self works well in this case. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael S. Tsirkin committed Jun 5, 2013 at 21:11 UTC dd29f0b4dcc4e5411adeb310d6cd14a5a626b22c
1 file changed +20
t/t9001-send-email.sh
+20
@@ -211,11 +211,31 @@ test_suppress_self_unquoted () {
211 EOF
212 }
213
214 +test_suppress_self_quoted () {
215 + test_suppress_self "$1" "$2" "quoted-$3" <<-EOF
216 + test suppress-cc.self quoted-$3 with name $1 email $2
217 +
218 + quoted-$3
219 +
220 + cccmd--"$1" <$2>
221 +
222 + Cc: $1 <$2>
223 + Cc: "$1" <$2>
224 + Signed-off-by: $1 <$2>
225 + Signed-off-by: "$1" <$2>
226 + EOF
227 +}
228 +
229 test_expect_success $PREREQ 'self name is suppressed' "
230 test_suppress_self_unquoted 'A U Thor' 'author@example.com' \
231 'self_name_suppressed'
232 "
233
234 +test_expect_success $PREREQ 'self name with dot is suppressed' "
235 + test_suppress_self_quoted 'A U. Thor' 'author@example.com' \
236 + 'self_name_dot_suppressed'
237 +"
238 +
239 test_expect_success $PREREQ 'Show all headers' '
240 git send-email \
241 --dry-run \