Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t/send-email: add test with quoted sender
author
Michael S. Tsirkin
<mst@redhat.com>
Wed, 5 Jun 2013 18:11:02 +0000
(21:11 +0300)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 5 Jun 2013 19:26:59 +0000
(12:26 -0700)
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>
t/t9001-send-email.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
da18759
)
diff --git
a/t/t9001-send-email.sh
b/t/t9001-send-email.sh
index d7797c5e3f07d8409a6a1854840b752a9ff8dd6f..39d82f46e4777b5742681dd9d525c0d75caa4734 100755
(executable)
--- a/
t/t9001-send-email.sh
+++ b/
t/t9001-send-email.sh
@@
-211,11
+211,31
@@
test_suppress_self_unquoted () {
EOF
}
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 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 \
test_expect_success $PREREQ 'Show all headers' '
git send-email \
--dry-run \