All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tanay Abhra <tanayabh@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ramkumar Ramachandra <artagnon@gmail.com>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: Re: [PATCH v9 2/2] test-config: add tests for the config_set API
Date: Tue, 15 Jul 2014 22:37:03 +0530	[thread overview]
Message-ID: <53C55FB7.7060405@gmail.com> (raw)
In-Reply-To: <xmqqk37ewr5r.fsf@gitster.dls.corp.google.com>



On 7/15/2014 9:27 PM, Junio C Hamano wrote:
>> +test_expect_success 'setup default config' '
>> +	cat >.git/config <<\EOF
> 
> So the default .git/config that was prepared by "git init" is
> discarded and replaced with this?  Shouldn't it be
> 
> 	cat >>.git/config <<\EOF
> 
> instead?
>

Most of tests like t1300-repo-config.sh or t1303-wacky-config.sh
clears the default config, will it be okay to clear it in
this test series also? I need it for
test_expect_success 'proper error on error in default config files' '
which requires me to compare the line no at which the error was found.

>> +test_expect_success 'find multiple values' '
>> +	cat >expect <<-\EOF &&
>> +	sam
>> +	bat
>> +	hask
>> +	EOF
>> +	test-config get_value_multi "case.baz">actual &&
>> +	test_cmp expect actual
>> +'
> 
> Hmmm, wasn't the whole point of the helper to allow us to make
> things like the above into a one-liner, perhaps like this?
> 
>       check_config get_value_multi case.baz sam bat hask

Noted and corrected.

> I suspect the same applies to most if not all uses of test-config
> in the remainder of this patch.
>

I cant use it for configset_get_value_* as it may have variable number
of files as arguments. :)

Thanks,
Tanay Abhra.

  reply	other threads:[~2014-07-15 17:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15 14:29 [PATCH v9 0/3] git config cache & special querying api utilizing the cache Tanay Abhra
2014-07-15 14:29 ` [PATCH v9 1/2] add `config_set` API for caching config-like files Tanay Abhra
2014-07-15 15:46   ` Junio C Hamano
2014-07-15 16:22     ` Tanay Abhra
2014-07-16 11:41     ` [PATCH v9r1 " Tanay Abhra
2014-07-15 14:29 ` [PATCH v9 2/2] test-config: add tests for the config_set API Tanay Abhra
2014-07-15 15:57   ` Junio C Hamano
2014-07-15 17:07     ` Tanay Abhra [this message]
2014-07-15 18:26       ` Junio C Hamano
2014-07-16 11:44     ` [PATCH v9r1 " Tanay Abhra
2014-07-16 11:49       ` Matthieu Moy
2014-07-16 12:22         ` [PATCH v9r2 1/2] add `config_set` API for caching config-like files Tanay Abhra
2014-07-16 16:06           ` Matthieu Moy
2014-07-16 16:09             ` [PATCH 1/3] fixup for patch 2: minor style fix Matthieu Moy
2014-07-16 16:09               ` [PATCH 2/3] fixup for patch 2: actually check the return value Matthieu Moy
2014-07-16 16:55                 ` Tanay Abhra
2014-07-16 17:10                   ` Matthieu Moy
2014-07-16 16:09               ` [PATCH 3/3] fixup for patch 1: typo Matthieu Moy
2014-07-16 16:44             ` [PATCH v9r2 1/2] add `config_set` API for caching config-like files Tanay Abhra
2014-07-16 17:06               ` Matthieu Moy
     [not found]                 ` <53C6C2BD.3030703@gmail.com>
2014-07-17 10:01                   ` Matthieu Moy
2014-07-17 11:06                     ` Tanay Abhra
2014-07-17 11:34                       ` Matthieu Moy
2014-07-17 11:13                     ` Matthieu Moy
2014-07-17 17:12                       ` Junio C Hamano
2014-07-16 12:22         ` [PATCH v9r2 2/2] test-config: add tests for the config_set API Tanay Abhra

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=53C55FB7.7060405@gmail.com \
    --to=tanayabh@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=Matthieu.Moy@imag.fr \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.