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

[PATCH v2 4/4] t4203: consolidate test-repository setup

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 11, 2013, 14:55 UTC
Message-ID
<1373554528-15775-5-git-send-email-sunshine@sunshineco.com>
In-Reply-To
<1373554528-15775-1-git-send-email-sunshine@sunshineco.com>

The simple two-commit test-repository created by 'setup' is no longer needed by any of the tests retrofitted to use check-mailmap. Subsequent, more complex tests of git-shortlog, git-log, and git-blame functionality expand the repository by adding five commits. Consolidate the creation of this seven-commit repository into a single setup function.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 t/t4203-mailmap.sh | 53 +++++++++++++++++++++++++++--------------------------
 1 file changed, 27 insertions(+), 26 deletions(-)
diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
index 48a000b..9c3c83a 100755
--- a/t/t4203-mailmap.sh
+++ b/t/t4203-mailmap.sh
@@ -22,10 +22,36 @@ test_expect_success setup '
 	git add one &&
 	test_tick &&
 	git commit -m initial &&
+
 	echo two >>one &&
 	git add one &&
 	test_tick &&
-	git commit --author "nick1 <bugs@company.xx>" -m second
+	git commit --author "nick1 <bugs@company.xx>" -m second &&
+
+	echo three >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "nick2 <bugs@company.xx>" -m third &&
+
+	echo four >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "nick2 <nick2@company.xx>" -m fourth &&
+
+	echo five >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "santa <me@company.xx>" -m fifth &&
+
+	echo six >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "claus <me@company.xx>" -m sixth &&
+
+	echo seven >>one &&
+	git add one &&
+	test_tick &&
+	git commit --author "CTO <cto@coompany.xx>" -m seventh
 '
 
 test_expect_success 'check-mailmap no arguments' '
@@ -276,31 +302,6 @@ Some Dude <some@dude.xx> (1):
 EOF
 
 test_expect_success 'Shortlog output (complex mapping)' '
-	echo three >>one &&
-	git add one &&
-	test_tick &&
-	git commit --author "nick2 <bugs@company.xx>" -m third &&
-
-	echo four >>one &&
-	git add one &&
-	test_tick &&
-	git commit --author "nick2 <nick2@company.xx>" -m fourth &&
-
-	echo five >>one &&
-	git add one &&
-	test_tick &&
-	git commit --author "santa <me@company.xx>" -m fifth &&
-
-	echo six >>one &&
-	git add one &&
-	test_tick &&
-	git commit --author "claus <me@company.xx>" -m sixth &&
-
-	echo seven >>one &&
-	git add one &&
-	test_tick &&
-	git commit --author "CTO <cto@coompany.xx>" -m seventh &&
-
 	mkdir -p internal_mailmap &&
 	echo "Committed <committer@example.com>" > internal_mailmap/.mailmap &&
 	echo "<cto@company.xx>                       <cto@coompany.xx>" >> internal_mailmap/.mailmap &&
-- 
1.8.3.2
Previous: Junio C Hamano
Message 18 of 18 in “add git-check-mailmap command”
  1. 0/4 add git-check-mailmap commandEric Sunshine, Jul 11, 2013
  2. 1/4 builtin: add git-check-mailmap commandEric Sunshine, Jul 11, 2013
  3. Junio C HamanoJul 11, 2013
  4. Eric SunshineJul 12, 2013
  5. Junio C HamanoJul 12, 2013
  6. Eric SunshineJul 12, 2013
  7. Junio C HamanoJul 12, 2013
  8. Eric SunshineJul 12, 2013
  9. 2/4 t4203: test check-mailmap command invocationEric Sunshine, Jul 11, 2013
  10. 3/4 t4203: test mailmap functionality directly rather than indirectlyEric Sunshine, Jul 11, 2013
  11. Junio C HamanoJul 11, 2013
  12. Eric SunshineJul 12, 2013
  13. Jonathan NiederJul 12, 2013
  14. Eric SunshineJul 12, 2013
  15. Junio C HamanoJul 12, 2013
  16. Eric SunshineJul 12, 2013
  17. Junio C HamanoJul 12, 2013
  18. 4/4 t4203: consolidate test-repository setupEric Sunshine, Jul 11, 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.