Subject: Re: [PATCH v2 4/4] t0302: test credential-store support for XDG_CONFIG_HOME

From: Matthieu Moy <[email-masked]>
Date: Mon, 09 Mar 2015 13:36:41 +0100

Paul Tan <[email-masked]> writes:

> diff --git a/t/t0302-credential-store.sh b/t/t0302-credential-store.sh
> index f61b40c..7fe832d 100755
> --- a/t/t0302-credential-store.sh
> +++ b/t/t0302-credential-store.sh
> @@ -5,5 +5,97 @@ test_description='credential-store tests'
>  . "$TEST_DIRECTORY"/lib-credential.sh
>  
>  helper_test store
> +test_expect_success '~/.git-credentials is written to when xdg credentials file does not exist' '
> +	test -s "$HOME/.git-credentials"
> +'
> +test_expect_success 'xdg credentials file will not be created if it does not exist' '

We usually put a blank line between tests.

> +helper_test store

That seems a bit "brute force" to me to re-run all tests several times.
It's probably OK since the tests are quite fast though.

> +test_expect_success 'set up custom XDG_CONFIG_HOME credential file' '
> +	XDG_CONFIG_HOME="$HOME/xdg" && export XDG_CONFIG_HOME &&
> +	mkdir -p "$HOME/xdg/git" &&

I'd spell that "$XDG_CONFIG_HOME"/git instead, but that's not really
important.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/