Re: [PATCHv2 06/13] credential: apply helper config
Jeff King <peff@peff.net> writes:
Show 22 quoted lines
> diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
> index 81a455f..e3f61f4 100755
> --- a/t/t0300-credentials.sh
> +++ b/t/t0300-credentials.sh
> @@ -192,4 +192,46 @@ test_expect_success 'internal getpass does not ask for known username' '
> EOF
> '
>
> +HELPER="f() {
> + cat >/dev/null
> + echo username=foo
> + echo password=bar
> + }; f"
> +test_expect_success 'respect configured credentials' '
> + test_config credential.helper "$HELPER" &&
> + check fill <<-\EOF
> + --
> + username=foo
> + password=bar
> + --
> + EOF
> +'Hmm, why do I get ask-ass-{username,password} from this one?Show 12 quoted lines
> +test_expect_success 'match configured credential' '
> + test_config credential.https://example.com.helper "$HELPER" &&
> + check fill <<-\EOF
> + protocol=https
> + host=example.com
> + path=repo.git
> + --
> + username=foo
> + password=bar
> + --
> + EOF
> +'