3 test_description='git-send-email'
8 'prepare reference tree' \
9 'echo "1A quick brown fox jumps over the" >file &&
10 echo "lazy dog" >>file &&
12 GIT_AUTHOR_NAME="A" git commit -a -m "Initial."'
16 'echo "#!/bin/sh" > fake.sendmail
17 echo "shift" >> fake.sendmail
18 echo "echo \"\$*\" > commandline" >> fake.sendmail
19 echo "cat > msgtxt" >> fake.sendmail
20 chmod +x ./fake.sendmail
22 GIT_AUTHOR_NAME="A" git commit -a -m "Second."'
25 'Extract patches and send' \
26 'git format-patch -n HEAD^1
27 git send-email -from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" ./0001*txt'
30 'Verify commandline' \
31 'cline=$(cat commandline)
32 [ "$cline" == "nobody@example.com author@example.com" ]'