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

[PATCH 1/3] Update t4001 to use modern syntax.

From
MRMark C. Chu-Carroll via B4 Relay <devnull+markchucarroll.fastmail.com@kernel.org>
Date
Sep 8, 2026, 19:44 UTC
Message-ID
<20260908-modernize-t4001-v1-1-cab3933a173f@fastmail.com>
In-Reply-To
<20260908-modernize-t4001-v1-0-cab3933a173f@fastmail.com>
From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>
---
 t/t4001-diff-rename.sh   | 31 ++++++++++++++++---------------
 t/t4009-diff-rename-4.sh |  8 ++++----
 2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/t/t4001-diff-rename.sh b/t/t4001-diff-rename.sh
index ad474100af..2aa161c217 100755
--- a/t/t4001-diff-rename.sh
+++ b/t/t4001-diff-rename.sh
@@ -88,28 +88,29 @@ test_expect_success 'setup' '
 	EOF
 '
 
-test_expect_success \
-    'update-index --add a file.' \
-    'git update-index --add path0'
+test_expect_success 'update-index --add a file.' '
+    git update-index --add path0
+'
 
-test_expect_success \
-    'write that tree.' \
-    'tree=$(git write-tree) && echo $tree'
+test_expect_success 'write that tree.' '
+    tree=$(git write-tree) && echo $tree
+'
 
 sed -e 's/line/Line/' <path0 >path1
 rm -f path0
-test_expect_success \
-    'renamed and edited the file.' \
-    'git update-index --add --remove path0 path1'
 
-test_expect_success \
-    'git diff-index -p -M after rename and editing.' \
-    'git diff-index -p -M $tree >current'
+test_expect_success 'renamed and edited the file.' '
+    git update-index --add --remove path0 path1
+'
+
+test_expect_success 'git diff-index -p -M after rename and editing.' '
+    git diff-index -p -M $tree >current
+'
 
 
-test_expect_success \
-    'validate the output.' \
-    'compare_diff_patch current expected'
+test_expect_success 'validate the output.' '
+    compare_diff_patch current expected
+'
 
 test_expect_success 'test diff.renames=true' '
 	git -c diff.renames=true diff --cached $tree >current &&
diff --git a/t/t4009-diff-rename-4.sh b/t/t4009-diff-rename-4.sh
index 59e71e3acd..8f86dc7274 100755
--- a/t/t4009-diff-rename-4.sh
+++ b/t/t4009-diff-rename-4.sh
@@ -19,10 +19,10 @@ test_expect_success \
     tree=$(git write-tree) &&
     echo $tree'
 
-test_expect_success \
-    'prepare work tree' \
-    'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
-    sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
+
+test_expect_success 'prepare work tree' '
+    sed -e "s/HOWEVER/However/" <COPYING >COPYING.1 &&
+    sed -e "s/GPL/G.P.L/g" <COPYING >COPYING.2 &&
     rm -f COPYING &&
     c1=$(git hash-object COPYING.1) &&
     c2=$(git hash-object COPYING.2) &&
-- 
2.53.0
Previous: Mark C. Chu-Carroll via B4 RelayNext: Junio C Hamano
Message 2 of 5 in “Update t40* tests to use modern style.”
  1. 0/3 Update t40* tests to use modern style.Mark C. Chu-Carroll via B4 Relay, Sep 8, 2026
  2. 1/3 Update t4001 to use modern syntax.Mark C. Chu-Carroll via B4 Relay, Sep 8, 2026
  3. Junio C HamanoSep 8, 2026
  4. 2/3 Update t4009 to use modern style.Mark C. Chu-Carroll via B4 Relay, Sep 8, 2026
  5. 3/3 Update t4010 to use modern style.Mark C. Chu-Carroll via B4 Relay, Sep 8, 2026

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.