git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] send-email: add tests for refactored prompting

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Mar 31, 2009, 14:19 UTC
Message-ID
<20090331141937.GC14611@atjola.homenet>
In-Reply-To
<76718490903310707s75e24e39l63f0d396f60a0583@mail.gmail.com>
On 2009.03.31 10:07:25 -0400, Jay Soffian wrote:
Show 36 quoted lines
> 2009/3/31 Björn Steinbrink <B.Steinbrink@gmx.de>:
> > These two cause interactive prompts for me.
> 
> Ah, it's because of going through test_must_fail. Grrr, a test farm
> for git would be nice. :-)
> 
> This should fix it up:
> 
> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
> index b4de98c..cd34525 100755
> --- a/t/t9001-send-email.sh
> +++ b/t/t9001-send-email.sh
> @@ -476,7 +476,8 @@ test_expect_success 'confirm detects EOF (inform
> assumes y)' '
>  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 \
> +       GIT_SEND_EMAIL_NOTTY=1 &&
> +       export GIT_SEND_EMAIL_NOTTY &&
>                 test_must_fail git send-email \
>                         --from="Example <nobody@example.com>" \
>                         --to=nobody@example.com \
> @@ -490,8 +491,9 @@ test_expect_success 'confirm detects EOF (auto
> causes failure)' '
>  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 \
> +       GIT_SEND_EMAIL_NOTTY=1 &&
> +       export GIT_SEND_EMAIL_NOTTY &&
> +               yes "bogus" | test_must_fail git send-email \
>                         --from="Example <nobody@example.com>" \
>                         --to=nobody@example.com \
>                         --smtp-server="$(pwd)/fake.sendmail" \
Yep, after fixing the linewrapping and restoring the tabs, this works.
> What's your OS and test shell btw?
Debian sid, kernel 2.6.29, dash as /bin/sh

Thanks, Björn

Previous: Jay SoffianNext: Jay Soffian
Message 6 of 17 in “send-email: refactor and ensure prompting doesn't loop forever”
  1. 1/2 send-email: refactor and ensure prompting doesn't loop foreverJay Soffian, Mar 29, 2009
  2. 2/2 send-email: add tests for refactored promptingJay Soffian, Mar 29, 2009
  3. Björn SteinbrinkMar 31, 2009
  4. Jay SoffianMar 31, 2009
  5. Jay SoffianMar 31, 2009
  6. Björn SteinbrinkMar 31, 2009
  7. Jay SoffianMar 31, 2009
  8. Jay SoffianMar 29, 2009
  9. Junio C HamanoMar 30, 2009
  10. Matthieu MoyMar 30, 2009
  11. Jay SoffianMar 30, 2009
  12. Jay SoffianMar 30, 2009
  13. Matthieu MoyMar 30, 2009
  14. Jay SoffianMar 30, 2009
  15. Jay SoffianMar 30, 2009
  16. Matthieu MoyMar 31, 2009
  17. Jay SoffianMar 31, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.