Re: [PATCH v8 8/8] add tests for `git_config_get_string_const()`

2014-08-07 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Tanay Abhra writes: >> >>> ... >>> + grep "line 7.*.git/config\|.git/config.*line 7" result >>> +' >> >> This is still dependant on the locale ("line" is translated). You need >> to use test_i18ngrep instead of grep here (see its definition a

Re: [PATCH v8 8/8] add tests for `git_config_get_string_const()`

2014-08-06 Thread Junio C Hamano
Matthieu Moy writes: > Tanay Abhra writes: > >> ... >> +grep "line 7.*.git/config\|.git/config.*line 7" result >> +' > > This is still dependant on the locale ("line" is translated). You need > to use test_i18ngrep instead of grep here (see its definition and > comment in t/test-lib.sh). > >

Re: [PATCH v8 8/8] add tests for `git_config_get_string_const()`

2014-08-06 Thread Tanay Abhra
On 8/6/2014 9:02 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> +test_expect_success 'find string value for a key' ' >> +check_config get_string case.baz hask && >> +check_config expect_code 1 get_string case.ba "Value not found for >> \"case.ba\"" >> +' >> + >> +test_expect_succes

Re: [PATCH v8 8/8] add tests for `git_config_get_string_const()`

2014-08-06 Thread Matthieu Moy
Tanay Abhra writes: > +test_expect_success 'find string value for a key' ' > + check_config get_string case.baz hask && > + check_config expect_code 1 get_string case.ba "Value not found for > \"case.ba\"" > +' > + > +test_expect_success 'check line error when NULL string is queried' ' >

[PATCH v8 8/8] add tests for `git_config_get_string_const()`

2014-08-06 Thread Tanay Abhra
Add tests for `git_config_get_string_const()`, check whether it dies printing the line number and the file name if a NULL value is retrieved for the given key. Signed-off-by: Tanay Abhra --- t/t1308-config-set.sh | 10 ++ test-config.c | 10 ++ 2 files changed, 20 inserti