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

[PATCH 1/3] t2106: adjust style to the current conventions

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 18, 2020, 14:49 UTC
Message-ID
<74828089e672024fd6e4aa23675939fe5b11eda2.1605710947.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.792.git.1605710947.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

We settled on the style where the test cases' code starts by the opening single quote being on the `test_expect_*` line, and the closing quote being in its own line after the code.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t2106-update-index-assume-unchanged.sh | 30 +++++++++++++-----------
 1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/t/t2106-update-index-assume-unchanged.sh b/t/t2106-update-index-assume-unchanged.sh
index 99d858c6b7..ff0947f388 100755
--- a/t/t2106-update-index-assume-unchanged.sh
+++ b/t/t2106-update-index-assume-unchanged.sh
@@ -5,20 +5,22 @@ test_description='git update-index --assume-unchanged test.
 
 . ./test-lib.sh
 
-test_expect_success 'setup' \
-	': >file &&
-	 git add file &&
-	 git commit -m initial &&
-	 git branch other &&
-	 echo upstream >file &&
-	 git add file &&
-	 git commit -m upstream'
+test_expect_success 'setup' '
+	: >file &&
+	git add file &&
+	git commit -m initial &&
+	git branch other &&
+	echo upstream >file &&
+	git add file &&
+	git commit -m upstream
+'
 
-test_expect_success 'do not switch branches with dirty file' \
-	'git reset --hard &&
-	 git checkout other &&
-	 echo dirt >file &&
-	 git update-index --assume-unchanged file &&
-	 test_must_fail git checkout master'
+test_expect_success 'do not switch branches with dirty file' '
+	git reset --hard &&
+	git checkout other &&
+	echo dirt >file &&
+	git update-index --assume-unchanged file &&
+	test_must_fail git checkout master
+'
 
 test_done
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 5 of 9 in “t2106 vs. the default branch name”
  1. 0/3 t2106 vs. the default branch nameJohannes Schindelin via GitGitGadget, Nov 18, 2020
  2. 2/3 t2106: make test independent of the current main branch nameJohannes Schindelin via GitGitGadget, Nov 18, 2020
  3. Junio C HamanoNov 18, 2020
  4. 3/3 t2106: ensure that the checkout fails for the expected reasonJohannes Schindelin via GitGitGadget, Nov 18, 2020
  5. 1/3 t2106: adjust style to the current conventionsJohannes Schindelin via GitGitGadget, Nov 18, 2020
  6. Junio C HamanoNov 18, 2020
  7. Johannes SchindelinNov 18, 2020
  8. Junio C HamanoNov 18, 2020
  9. Johannes SchindelinNov 18, 2020

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.