git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] t: don't redefine test_config() in various places

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Mar 20, 2013, 08:21 UTC
Message-ID
<1363767703-12936-1-git-send-email-artagnon@gmail.com>
In-Reply-To
<7vk3p3jrrw.fsf@alter.siamese.dyndns.org>

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
Previous: Junio C HamanoNext: Jonathan Nieder
Message 3 of 6 in “t7811 (grep-open): remove test_config() redefinition”
  1. t7811 (grep-open): remove test_config() redefinitionRamkumar Ramachandra, Mar 19, 2013
  2. Junio C HamanoMar 19, 2013
  3. t: don't redefine test_config() in various placesRamkumar Ramachandra, Mar 20, 2013
  4. Jonathan NiederMar 20, 2013
  5. Junio C HamanoMar 20, 2013
  6. Ramkumar RamachandraMar 20, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.