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

[PATCH 4/7] modernize t9300: wrap lines after &&

From
Johannes Sixt <j6t@kdbg.org>
Date
Nov 19, 2015, 19:09 UTC
Message-ID
<5b25e5967f28ee953145bb80c5d5bfc3b699baa3.1447959452.git.j6t@kdbg.org>
In-Reply-To
<cover.1447959452.git.j6t@kdbg.org>

It is customary to have each command in test snippets on its own line. Fix those instances that do not follow this guideline.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 t/t9300-fast-import.sh | 48 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index ceb3db3..c36afdb 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -130,17 +130,20 @@ test_expect_success 'A: verify tree' '
 
 echo "$file2_data" >expect
 test_expect_success 'A: verify file2' '
-	git cat-file blob master:file2 >actual && test_cmp expect actual
+	git cat-file blob master:file2 >actual &&
+	test_cmp expect actual
 '
 
 echo "$file3_data" >expect
 test_expect_success 'A: verify file3' '
-	git cat-file blob master:file3 >actual && test_cmp expect actual
+	git cat-file blob master:file3 >actual &&
+	test_cmp expect actual
 '
 
 printf "$file4_data" >expect
 test_expect_success 'A: verify file4' '
-	git cat-file blob master:file4 >actual && test_cmp expect actual
+	git cat-file blob master:file4 >actual &&
+	test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -1656,10 +1659,14 @@ INPUT_END
 test_expect_success 'P: superproject & submodule mix' '
 	git fast-import <input &&
 	git checkout subuse1 &&
-	rm -rf sub && mkdir sub && (cd sub &&
-	git init &&
-	git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
-	git checkout master) &&
+	rm -rf sub &&
+	mkdir sub &&
+	(
+		cd sub &&
+		git init &&
+		git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
+		git checkout master
+	) &&
 	git submodule init &&
 	git submodule update
 '
@@ -1697,7 +1704,8 @@ INPUT_END
 
 test_expect_success 'P: verbatim SHA gitlinks' '
 	git branch -D sub &&
-	git gc && git prune &&
+	git gc &&
+	git prune &&
 	git fast-import <input &&
 	test $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)
 '
@@ -1942,17 +1950,20 @@ test_expect_success 'Q: verify first notes tree' '
 
 echo "$note1_data" >expect
 test_expect_success 'Q: verify first note for first commit' '
-	git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar~2:$commit1 >actual &&
+	test_cmp expect actual
 '
 
 echo "$note2_data" >expect
 test_expect_success 'Q: verify first note for second commit' '
-	git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar~2:$commit2 >actual &&
+	test_cmp expect actual
 '
 
 echo "$note3_data" >expect
 test_expect_success 'Q: verify first note for third commit' '
-	git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar~2:$commit3 >actual &&
+	test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -1980,17 +1991,20 @@ test_expect_success 'Q: verify second notes tree' '
 
 echo "$note1b_data" >expect
 test_expect_success 'Q: verify second note for first commit' '
-	git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar^:$commit1 >actual &&
+	test_cmp expect actual
 '
 
 echo "$note2_data" >expect
 test_expect_success 'Q: verify first note for second commit' '
-	git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar^:$commit2 >actual &&
+	test_cmp expect actual
 '
 
 echo "$note3_data" >expect
 test_expect_success 'Q: verify first note for third commit' '
-	git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar^:$commit3 >actual &&
+	test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -2015,7 +2029,8 @@ test_expect_success 'Q: verify third notes tree' '
 
 echo "$note1c_data" >expect
 test_expect_success 'Q: verify third note for first commit' '
-	git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar2:$commit1 >actual &&
+	test_cmp expect actual
 '
 
 cat >expect <<EOF
@@ -2041,7 +2056,8 @@ test_expect_success 'Q: verify fourth notes tree' '
 
 echo "$note2b_data" >expect
 test_expect_success 'Q: verify second note for second commit' '
-	git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual
+	git cat-file blob refs/notes/foobar:$commit2 >actual &&
+	test_cmp expect actual
 '
 
 cat >input <<EOF
-- 
2.6.2.337.ga235d84
Previous: Johannes SixtNext: Johannes Sixt
Message 5 of 10 in “Modernize t9300-fast-import”
  1. 0/7 Modernize t9300-fast-importJohannes Sixt, Nov 19, 2015
  2. 1/7 modernize t9300: single-quote placement and indentationJohannes Sixt, Nov 19, 2015
  3. 2/7 modernize t9300: use test_must_failJohannes Sixt, Nov 19, 2015
  4. 3/7 modernize t9300: use test_must_be_emptyJohannes Sixt, Nov 19, 2015
  5. 4/7 modernize t9300: wrap lines after &&Johannes Sixt, Nov 19, 2015
  6. 5/7 modernize t9300: use test_when_finished for clean-upJohannes Sixt, Nov 19, 2015
  7. 6/7 modernize t9300: mark here-doc words to ignore tab indentationJohannes Sixt, Nov 19, 2015
  8. 7/7 modernize t9300: move test preparations into test_expect_successJohannes Sixt, Nov 19, 2015
  9. Eric SunshineNov 20, 2015
  10. Jeff KingNov 20, 2015

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.