summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-29 23:53:13 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-30 00:09:36 -0700
commit2186d566a6c2dfb2f168ae608bbb2e0e77122d7e (patch)
tree316a64641a2963517919562f7d3e28d135081474 /t
parentAdd a basic test case for git send-email, and fix some real bugs discovered. (diff)
downloadtgif-2186d566a6c2dfb2f168ae608bbb2e0e77122d7e.tar.xz
send-email: do not pass bogus address to local sendmail binary
This makes t9001 test happy. Also fixes the warning on uninitialized $references variable again. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t9001-send-email.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 276cbac3ba..a61da1efbd 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -13,10 +13,14 @@ test_expect_success \
test_expect_success \
'Setup helper tool' \
- 'echo "#!/bin/sh" > fake.sendmail
- echo "shift" >> fake.sendmail
- echo "echo \"\$*\" > commandline" >> fake.sendmail
- echo "cat > msgtxt" >> fake.sendmail
+ '(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."'
@@ -26,9 +30,12 @@ test_expect_success \
'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' \
- 'cline=$(cat commandline)
- [ "$cline" == "nobody@example.com author@example.com" ]'
+ 'diff commandline expected'
test_done