diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-30 10:53:13 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-30 11:09:36 +0400 |
commit | 2186d566a6c2dfb2f168ae608bbb2e0e77122d7e (patch) | |
tree | 316a64641a2963517919562f7d3e28d135081474 /t | |
parent | ce903018f1ed0283fdaa3de1ec3ad29fccf25c96 (diff) |
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-x | t/t9001-send-email.sh | 19 |
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 |