Re: [PATCH 2/2] send-email: add tests for refactored prompting
On 2009.03.28 21:39:11 -0400, Jay Soffian wrote:
Show 26 quoted lines
> +test_expect_success 'confirm detects EOF (auto causes failure)' '
> + CONFIRM=$(git config --get sendemail.confirm) &&
> + git config sendemail.confirm auto &&
> + GIT_SEND_EMAIL_NOTTY=1 \
> + test_must_fail git send-email \
> + --from="Example <nobody@example.com>" \
> + --to=nobody@example.com \
> + --smtp-server="$(pwd)/fake.sendmail" \
> + $patches < /dev/null
> + ret="$?"
> + git config sendemail.confirm ${CONFIRM:-never}
> + test $ret = "0"
> +'
> +
> +test_expect_success 'confirm doesnt loop forever' '
> + CONFIRM=$(git config --get sendemail.confirm) &&
> + git config sendemail.confirm auto &&
> + yes "bogus" | GIT_SEND_EMAIL_NOTTY=1 \
> + test_must_fail git send-email \
> + --from="Example <nobody@example.com>" \
> + --to=nobody@example.com \
> + --smtp-server="$(pwd)/fake.sendmail" \
> + $patches
> + ret="$?"
> + git config sendemail.confirm ${CONFIRM:-never}
> + test $ret = "0"These two cause interactive prompts for me.
Björn