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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009.03.31 10:07:25 -0400, Jay Soffian wrote:
> 2009/3/31 Björn Steinbrink <B.Steinbrink@xxxxxx>:
> > 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@xxxxxxxxxxx>" \
>                         --to=nobody@xxxxxxxxxxx \
> @@ -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@xxxxxxxxxxx>" \
>                         --to=nobody@xxxxxxxxxxx \
>                         --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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux