summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-05-31 18:29:31 -0400
committerJunio C Hamano <gitster@pobox.com>2015-06-01 15:53:15 -0700
commit6be02640301a7517c76792f5b0e7c978e6961022 (patch)
treed55d246b7f67440b84d45b6015f8a75d7d4ba74e /t/t9001-send-email.sh
parent514554cf53757298f948e3b53ddb55f7c922bfa1 (diff)
downloadgit-6be02640301a7517c76792f5b0e7c978e6961022.tar.gz
t9001: add sendmail aliases line continuation tests
A line beginning with whitespace is folded into the preceding line. A line ending with '\' consumes the following line. While here, also test an empty sendmail aliases file. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 1012fa3ad6..db2f45e83b 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -1587,6 +1587,40 @@ test_sendmail_aliases 'sendemail.aliasfiletype=sendmail' \
bcgrp: bob, chloe, Other <o@example.com>
EOF
+test_sendmail_aliases 'sendmail aliases line folding' \
+ alice1 \
+ bob1 bob2 \
+ chuck1 chuck2 \
+ darla1 darla2 darla3 \
+ elton1 elton2 elton3 \
+ fred1 fred2 \
+ greg1 <<-\EOF
+ alice: alice1
+ bob: bob1,\
+ bob2
+ chuck: chuck1,
+ chuck2
+ darla: darla1,\
+ darla2,
+ darla3
+ elton: elton1,
+ elton2,\
+ elton3
+ fred: fred1,\
+ fred2
+ greg: greg1
+ bcgrp: bob, chuck, darla, elton, fred, greg
+ EOF
+
+test_sendmail_aliases 'sendmail aliases tolerate bogus line folding' \
+ alice1 bob1 <<-\EOF
+ alice: alice1
+ bcgrp: bob1\
+ EOF
+
+test_sendmail_aliases 'sendmail aliases empty' alice bcgrp <<-\EOF
+ EOF
+
do_xmailer_test () {
expected=$1 params=$2 &&
git format-patch -1 &&