From: Björn Steinbrink Date: Tue, 31 Mar 2009 10:33:03 GMT Subject: Re: [PATCH 2/2] send-email: add tests for refactored prompting Message-ID: <20090331103303.GD3307@atjola.homenet> In-Reply-To: <1238290751-57461-2-git-send-email-jaysoffian@gmail.com> On 2009.03.28 21:39:11 -0400, Jay Soffian wrote: > +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 " \ > + --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 " \ > + --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