t0300: add tests for some additional cases
commit588c70e10f3511f85110512da97b188f3c581e53
authorbrian m. carlson <bk2204@github.com>
Thu, 20 Feb 2020 02:24:11 +0000 (20 02:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Feb 2020 21:05:43 +0000 (20 13:05 -0800)
tree999a4304984e5c7b92cc6563bcc8829d847eca18
parent732f93440831a9253ad5b9bd16a81e25e1901f22
t0300: add tests for some additional cases

There are some tricky cases in our credential helpers that we don't have
test cases for.  To help prevent regressions, let's add some for these
cases:

* If there are multiple configured credential helpers, one without a
  path and one with a path, we want to invoke both of them.
* If there are percent-encoded values in the URL, we handle them
  properly.
* And finally, if there is a username in the remote URL, we want to
  honor that over what the configuration tells us.

Finally, there's an additional case that we'd like to test for as well,
but that currently fails.  In all other situations in our configuration,
we pick the last configuration setting that's provided.  However, we
fail to do that for credential.username, where we pick the first setting
instead.  Let's add a failing test that we have the consistent behavior
here, since that's the documented, expected behavior.

Signed-off-by: brian m. carlson <bk2204@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0300-credentials.sh