From 2186d566a6c2dfb2f168ae608bbb2e0e77122d7e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 29 May 2006 23:53:13 -0700 Subject: 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 --- t/t9001-send-email.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 't') 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 " --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 -- cgit v1.2.3