diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-30 00:09:59 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-30 00:09:59 -0700 |
commit | 62b693a0705c55dbc5573946f1f3fc6175cd2620 (patch) | |
tree | cb9f0c9c22aca3edce3d6a25aaf56b3c36c197f0 /t | |
parent | 5029f6458f99cabce6d80bba09da2137f86cc59e (diff) | |
parent | 2186d566a6c2dfb2f168ae608bbb2e0e77122d7e (diff) | |
download | git-62b693a0705c55dbc5573946f1f3fc6175cd2620.tar.gz |
Merge branch 'master' into next
* master:
send-email: do not pass bogus address to local sendmail binary
Add a basic test case for git send-email, and fix some real bugs discovered.
Fix a bug in email extraction used in git-send-email.
Add support for --bcc to git-send-email.
git-send-email: Add References: headers to emails, in addition to In-Reply-To:
git-clean fails on files beginning with a dash
git-svn: remove assertion that broke with older versions of svn
git-svn: t0001: workaround a heredoc bug in old versions of dash
Documentation: fix a tutorial-2 typo
Documentation: retitle the git-core tutorial
documentation: add brief mention of cat-file to tutorial part I
documentation: mention gitk font adjustment in tutorial
Fix some documentation typoes
Diffstat (limited to 't')
-rwxr-xr-x | t/t9001-send-email.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh new file mode 100755 index 0000000000..a61da1efbd --- /dev/null +++ b/t/t9001-send-email.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +test_description='git-send-email' +. ./test-lib.sh + +PROG='git send-email' +test_expect_success \ + 'prepare reference tree' \ + 'echo "1A quick brown fox jumps over the" >file && + echo "lazy dog" >>file && + git add file + GIT_AUTHOR_NAME="A" git commit -a -m "Initial."' + +test_expect_success \ + 'Setup helper tool' \ + '(echo "#!/bin/sh" + echo shift + echo for a + echo do + echo " echo \"!\$a!\"" + echo "done >commandline" + echo "cat > msgtxt" + ) >fake.sendmail + chmod +x ./fake.sendmail + git add fake.sendmail + GIT_AUTHOR_NAME="A" git commit -a -m "Second."' + +test_expect_success \ + 'Extract patches and send' \ + 'git format-patch -n HEAD^1 + git send-email -from="Example <nobody@example.com>" --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" ./0001*txt' + +cat >expected <<\EOF +!nobody@example.com! +!author@example.com! +EOF +test_expect_success \ + 'Verify commandline' \ + 'diff commandline expected' + +test_done |