git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Paul Tan <pyokagan@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 4/4] t0302: test credential-store support for XDG_CONFIG_HOME
Date: Mon, 09 Mar 2015 13:36:41 +0100	[thread overview]
Message-ID: <vpqk2yqcppi.fsf@anie.imag.fr> (raw)
In-Reply-To: <1425801532-8483-5-git-send-email-pyokagan@gmail.com> (Paul Tan's message of "Sun, 8 Mar 2015 15:58:52 +0800")

Paul Tan <pyokagan@gmail.com> 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/

  reply	other threads:[~2015-03-09 12:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08  7:58 [PATCH v2 0/4] git-credential-store: XDG user-specific config file support Paul Tan
2015-03-08  7:58 ` [PATCH v2 1/4] git-credential-store: support multiple credential files Paul Tan
2015-03-08  7:58 ` [PATCH v2 2/4] git-credential-store: support XDG_CONFIG_HOME Paul Tan
2015-03-10 13:43   ` Paul Tan
2015-03-08  7:58 ` [PATCH v2 3/4] docs/git-credential-store: document XDG file and precedence Paul Tan
2015-03-08  7:58 ` [PATCH v2 4/4] t0302: test credential-store support for XDG_CONFIG_HOME Paul Tan
2015-03-09 12:36   ` Matthieu Moy [this message]
2015-03-10 13:55     ` Paul Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqk2yqcppi.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=pyokagan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).