* [PATCH] t7811 (grep-open): remove test_config() redefinition
@ 2013-03-19 10:43 Ramkumar Ramachandra
2013-03-19 16:09 ` Junio C Hamano
0 siblings, 1 reply; 6+ messages in thread
From: Ramkumar Ramachandra @ 2013-03-19 10:43 UTC (permalink / raw)
To: Git List
test_config() is already a well-defined function in
test-lib-functions.sh. Don't duplicate it unnecessarily.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Found this while randomly grep'ping around.
t/t7811-grep-open.sh | 5 -----
1 file changed, 5 deletions(-)
diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
index a895778..e1951a5 100755
--- a/t/t7811-grep-open.sh
+++ b/t/t7811-grep-open.sh
@@ -125,11 +125,6 @@ test_expect_success 'modified file' '
test_cmp empty out
'
-test_config() {
- git config "$1" "$2" &&
- test_when_finished "git config --unset $1"
-}
-
test_expect_success 'copes with color settings' '
rm -f actual &&
echo grep.h >expect &&
--
1.8.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] t7811 (grep-open): remove test_config() redefinition
2013-03-19 10:43 [PATCH] t7811 (grep-open): remove test_config() redefinition Ramkumar Ramachandra
@ 2013-03-19 16:09 ` Junio C Hamano
2013-03-20 8:21 ` [PATCH] t: don't redefine test_config() in various places Ramkumar Ramachandra
0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2013-03-19 16:09 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: Git List
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> test_config() is already a well-defined function in
> test-lib-functions.sh. Don't duplicate it unnecessarily.
There are other instances of it in t7810 and t4018, with slightly
different styles.
t/t4018-diff-funcname.sh:test_config () {
t/t7810-grep.sh:test_config() {
t/t7811-grep-open.sh:test_config() {
t/test-lib-functions.sh:test_config () {
Incidentally, this is why a consistent coding style helps. It
should be possible to catch all ofhtme with a single
git grep 'test_config () {' t/
but the ones in t78xx wouldn't have been found.
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> Found this while randomly grep'ping around.
>
> t/t7811-grep-open.sh | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
> index a895778..e1951a5 100755
> --- a/t/t7811-grep-open.sh
> +++ b/t/t7811-grep-open.sh
> @@ -125,11 +125,6 @@ test_expect_success 'modified file' '
> test_cmp empty out
> '
>
> -test_config() {
> - git config "$1" "$2" &&
> - test_when_finished "git config --unset $1"
> -}
> -
> test_expect_success 'copes with color settings' '
> rm -f actual &&
> echo grep.h >expect &&
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] t: don't redefine test_config() in various places
2013-03-19 16:09 ` Junio C Hamano
@ 2013-03-20 8:21 ` Ramkumar Ramachandra
2013-03-20 18:40 ` Jonathan Nieder
2013-03-20 18:51 ` Junio C Hamano
0 siblings, 2 replies; 6+ messages in thread
From: Ramkumar Ramachandra @ 2013-03-20 8:21 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git List
test_config() is already a well-defined function in
test-lib-functions.sh. Don't duplicate it unnecessarily in:
t4018-diff-funcname.sh
t7810-grep.sh
t7811-grep-open.sh
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Thanks, Junio.
t/t4018-diff-funcname.sh | 5 -----
t/t7810-grep.sh | 5 -----
t/t7811-grep-open.sh | 5 -----
3 files changed, 15 deletions(-)
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 082d3e8..38a092a 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -93,11 +93,6 @@ sed -e '
s/song;/song();/
' <Beer.perl >Beer-correct.perl
-test_config () {
- git config "$1" "$2" &&
- test_when_finished "git config --unset $1"
-}
-
test_expect_funcname () {
lang=${2-java}
test_expect_code 1 git diff --no-index -U1 \
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index f698001..500eb50 100755
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
@@ -1084,11 +1084,6 @@ test_expect_success 'grep -E pattern with grep.patternType=fixed' '
test_cmp expected actual
'
-test_config() {
- git config "$1" "$2" &&
- test_when_finished "git config --unset $1"
-}
-
cat >expected <<EOF
hello.c<RED>:<RESET>int main(int argc, const char **argv)
hello.c<RED>-<RESET>{
diff --git a/t/t7811-grep-open.sh b/t/t7811-grep-open.sh
index a895778..e1951a5 100755
--- a/t/t7811-grep-open.sh
+++ b/t/t7811-grep-open.sh
@@ -125,11 +125,6 @@ test_expect_success 'modified file' '
test_cmp empty out
'
-test_config() {
- git config "$1" "$2" &&
- test_when_finished "git config --unset $1"
-}
-
test_expect_success 'copes with color settings' '
rm -f actual &&
echo grep.h >expect &&
--
1.8.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] t: don't redefine test_config() in various places
2013-03-20 8:21 ` [PATCH] t: don't redefine test_config() in various places Ramkumar Ramachandra
@ 2013-03-20 18:40 ` Jonathan Nieder
2013-03-20 18:51 ` Junio C Hamano
1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Nieder @ 2013-03-20 18:40 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: Junio C Hamano, Git List
Ramkumar Ramachandra wrote:
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> Thanks, Junio.
>
> t/t4018-diff-funcname.sh | 5 -----
> t/t7810-grep.sh | 5 -----
> t/t7811-grep-open.sh | 5 -----
> 3 files changed, 15 deletions(-)
Yeah, that looks like all of them. FWIW,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] t: don't redefine test_config() in various places
2013-03-20 8:21 ` [PATCH] t: don't redefine test_config() in various places Ramkumar Ramachandra
2013-03-20 18:40 ` Jonathan Nieder
@ 2013-03-20 18:51 ` Junio C Hamano
2013-03-20 19:59 ` Ramkumar Ramachandra
1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2013-03-20 18:51 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: Git List
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> test_config() is already a well-defined function in
> test-lib-functions.sh. Don't duplicate it unnecessarily in:
>
> t4018-diff-funcname.sh
> t7810-grep.sh
> t7811-grep-open.sh
>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
> Thanks, Junio.
Heh, I've pushed out the original one after fixing them up myself
last night.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] t: don't redefine test_config() in various places
2013-03-20 18:51 ` Junio C Hamano
@ 2013-03-20 19:59 ` Ramkumar Ramachandra
0 siblings, 0 replies; 6+ messages in thread
From: Ramkumar Ramachandra @ 2013-03-20 19:59 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git List
Junio C Hamano wrote:
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>> test_config() is already a well-defined function in
>> test-lib-functions.sh. Don't duplicate it unnecessarily in:
>>
>> t4018-diff-funcname.sh
>> t7810-grep.sh
>> t7811-grep-open.sh
>>
>> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
>> ---
>> Thanks, Junio.
>
> Heh, I've pushed out the original one after fixing them up myself
> last night.
Doing a fine job as the editor, as always. I need to watch `pu` more closely.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-20 20:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-19 10:43 [PATCH] t7811 (grep-open): remove test_config() redefinition Ramkumar Ramachandra
2013-03-19 16:09 ` Junio C Hamano
2013-03-20 8:21 ` [PATCH] t: don't redefine test_config() in various places Ramkumar Ramachandra
2013-03-20 18:40 ` Jonathan Nieder
2013-03-20 18:51 ` Junio C Hamano
2013-03-20 19:59 ` Ramkumar Ramachandra
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.