summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-06-05 18:11:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-05 19:26:59 (GMT)
commitdd29f0b4dcc4e5411adeb310d6cd14a5a626b22c (patch)
treef5a239b1d124dc53b8dcf2410bcf13adfbdbcbb4 /t
parentda18759e86bb1a7ee718c79a0c6cb15fbcbdf3c2 (diff)
downloadgit-dd29f0b4dcc4e5411adeb310d6cd14a5a626b22c.zip
git-dd29f0b4dcc4e5411adeb310d6cd14a5a626b22c.tar.gz
git-dd29f0b4dcc4e5411adeb310d6cd14a5a626b22c.tar.bz2
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t9001-send-email.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index d7797c5..39d82f4 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -211,11 +211,31 @@ test_suppress_self_unquoted () {
EOF
}
+test_suppress_self_quoted () {
+ test_suppress_self "$1" "$2" "quoted-$3" <<-EOF
+ test suppress-cc.self quoted-$3 with name $1 email $2
+
+ quoted-$3
+
+ cccmd--"$1" <$2>
+
+ Cc: $1 <$2>
+ Cc: "$1" <$2>
+ Signed-off-by: $1 <$2>
+ Signed-off-by: "$1" <$2>
+ EOF
+}
+
test_expect_success $PREREQ 'self name is suppressed' "
test_suppress_self_unquoted 'A U Thor' 'author@example.com' \
'self_name_suppressed'
"
+test_expect_success $PREREQ 'self name with dot is suppressed' "
+ test_suppress_self_quoted 'A U. Thor' 'author@example.com' \
+ 'self_name_dot_suppressed'
+"
+
test_expect_success $PREREQ 'Show all headers' '
git send-email \
--dry-run \