Thread (3 messages) 3 messages, 2 authors, 2016-06-15

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

From: Tanay Abhra <hidden>
Date: 2016-06-15 23:01:55

Possibly related (same subject, not in this thread)


On 7/15/2014 9:27 PM, Junio C Hamano wrote:
quoted
+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.
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help