From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Tanay Abhra <tanayabh@gmail•com>
Cc: git@vger•kernel.org, Ramkumar Ramachandra <artagnon@gmail•com>,
Junio C Hamano <gitster@pobox•com>,
Eric Sunshine <sunshine@sunshineco•com>
Subject: Re: [PATCH v6 2/2] test-config: Add tests for the config_set API
Date: Mon, 07 Jul 2014 19:04:55 +0200 [thread overview]
Message-ID: <vpqvbr9w154.fsf@anie.imag.fr> (raw)
In-Reply-To: <1404719566-3368-3-git-send-email-tanayabh@gmail.com> (Tanay Abhra's message of "Mon, 7 Jul 2014 00:52:46 -0700")
Tanay Abhra <tanayabh@gmail•com> writes:
> diff --git a/t/t1308-config-hash.sh b/t/t1308-config-hash.sh
> new file mode 100755
> index 0000000..ad99f8b
> --- /dev/null
> +++ b/t/t1308-config-hash.sh
> @@ -0,0 +1,168 @@
> +#!/bin/sh
> +
> +test_description='Test git config-hash API in different settings'
You may want to call it "config_set API" now.
> +#'check section.key value' verifies that the entry for section.key is
> +#'value'
Style: space after #.
> +check() {
> + echo "$2" >expected
> + test-config get_value "$1" >actual 2>&1
> + test_cmp actual expected
> +}
You need to &&-chain these lines, to catch potential test-config
failures (if it returns 1 after sending the right output, you won't
notice).
The doc says
- test_cmp <expected> <actual>
You swapped the order of parameters.
> +test_expect_success 'setup default config' '
> + cat >.git/config << EOF
Missing && here (sorry, I should have noticed the first time).
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2014-07-07 17:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 7:52 [PATCH v6 0/3] git config cache & special querying api utilizing the cache Tanay Abhra
2014-07-07 7:52 ` [PATCH v6 1/2] add `config_set` API for caching config-like files Tanay Abhra
2014-07-07 7:52 ` [PATCH v6 2/2] test-config: Add tests for the config_set API Tanay Abhra
2014-07-07 17:04 ` Matthieu Moy [this message]
2014-07-09 11:15 ` Tanay Abhra
2014-07-09 12:10 ` Matthieu Moy
2014-07-07 17:10 ` [PATCH v6 0/3] git config cache & special querying api utilizing the cache Matthieu Moy
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=vpqvbr9w154.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp$(echo .)fr \
--cc=artagnon@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=sunshine@sunshineco$(echo .)com \
--cc=tanayabh@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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