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>

Eric Sunshine committed May 31, 2015 at 18:29 UTC 6be02640301a7517c76792f5b0e7c978e6961022
1 file changed +34
t/t9001-send-email.sh
+34
@@ -1587,6 +1587,40 @@ test_sendmail_aliases 'sendemail.aliasfiletype=sendmail' \
1587 bcgrp: bob, chloe, Other <o@example.com>
1588 EOF
1589
1590 +test_sendmail_aliases 'sendmail aliases line folding' \
1591 + alice1 \
1592 + bob1 bob2 \
1593 + chuck1 chuck2 \
1594 + darla1 darla2 darla3 \
1595 + elton1 elton2 elton3 \
1596 + fred1 fred2 \
1597 + greg1 <<-\EOF
1598 + alice: alice1
1599 + bob: bob1,\
1600 + bob2
1601 + chuck: chuck1,
1602 + chuck2
1603 + darla: darla1,\
1604 + darla2,
1605 + darla3
1606 + elton: elton1,
1607 + elton2,\
1608 + elton3
1609 + fred: fred1,\
1610 + fred2
1611 + greg: greg1
1612 + bcgrp: bob, chuck, darla, elton, fred, greg
1613 + EOF
1614 +
1615 +test_sendmail_aliases 'sendmail aliases tolerate bogus line folding' \
1616 + alice1 bob1 <<-\EOF
1617 + alice: alice1
1618 + bcgrp: bob1\
1619 + EOF
1620 +
1621 +test_sendmail_aliases 'sendmail aliases empty' alice bcgrp <<-\EOF
1622 + EOF
1623 +
1624 do_xmailer_test () {
1625 expected=$1 params=$2 &&
1626 git format-patch -1 &&