Re: [PATCH v9 2/2] test-config: add tests for the config_set API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]