summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-10-27 04:52:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-10-27 04:52:26 (GMT)
commit9b1054d93e7e8564d0d9865cb7118cb6e756c74b (patch)
tree0b9de3569b26589e6fa265e15d1ed204828ce069 /t/t9001-send-email.sh
parente6202dfe0021e2662eb4e19e6d01e33081608b5e (diff)
parent6e74e075d25aea67cf973e456a6804c0c3741235 (diff)
downloadgit-9b1054d93e7e8564d0d9865cb7118cb6e756c74b.zip
git-9b1054d93e7e8564d0d9865cb7118cb6e756c74b.tar.gz
git-9b1054d93e7e8564d0d9865cb7118cb6e756c74b.tar.bz2
Merge branch 'jp/send-email-to-cmd'
* jp/send-email-to-cmd: git-send-email.perl: Add --to-cmd Conflicts: git-send-email.perl
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index a298eb0..ba11c00 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -201,6 +201,24 @@ test_expect_success $PREREQ 'Prompting works' '
grep "^To: to@example.com\$" msgtxt1
'
+test_expect_success $PREREQ 'tocmd works' '
+ clean_fake_sendmail &&
+ cp $patches tocmd.patch &&
+ echo tocmd--tocmd@example.com >>tocmd.patch &&
+ {
+ echo "#!$SHELL_PATH"
+ echo sed -n -e s/^tocmd--//p \"\$1\"
+ } > tocmd-sed &&
+ chmod +x tocmd-sed &&
+ git send-email \
+ --from="Example <nobody@example.com>" \
+ --to-cmd=./tocmd-sed \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ tocmd.patch \
+ &&
+ grep "^To: tocmd@example.com" msgtxt1
+'
+
test_expect_success $PREREQ 'cccmd works' '
clean_fake_sendmail &&
cp $patches cccmd.patch &&