Skip to content

Commit dd29f0b

Browse files
mstsirkingitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da18759 commit dd29f0b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

t/t9001-send-email.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,31 @@ test_suppress_self_unquoted () {
211211
EOF
212212
}
213213

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+
214229
test_expect_success $PREREQ 'self name is suppressed' "
215230
test_suppress_self_unquoted 'A U Thor' '[email protected]' \
216231
'self_name_suppressed'
217232
"
218233

234+
test_expect_success $PREREQ 'self name with dot is suppressed' "
235+
test_suppress_self_quoted 'A U. Thor' '[email protected]' \
236+
'self_name_dot_suppressed'
237+
"
238+
219239
test_expect_success $PREREQ 'Show all headers' '
220240
git send-email \
221241
--dry-run \

0 commit comments

Comments
 (0)