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

[PATCH 3/3] Update t4010 to use modern style.

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-3-cab3933a173f@fastmail.com>
In-Reply-To
<20260908-modernize-t4001-v1-0-cab3933a173f@fastmail.com>
From: "Mark C. Chu-Carroll" <markchucarroll@fastmail.com>
---
 t/t4010-diff-pathspec.sh | 78 ++++++++++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 39 deletions(-)
diff --git a/t/t4010-diff-pathspec.sh b/t/t4010-diff-pathspec.sh
index c84c3fa05b..59e4501203 100755
--- a/t/t4010-diff-pathspec.sh
+++ b/t/t4010-diff-pathspec.sh
@@ -13,67 +13,67 @@ Prepare:
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
-test_expect_success \
-    setup \
-    'echo frotz >file0 &&
-     mkdir path1 &&
-     echo rezrov >path1/file1 &&
-     before0=$(git hash-object file0) &&
-     before1=$(git hash-object path1/file1) &&
-     git update-index --add file0 path1/file1 &&
-     tree=$(git write-tree) &&
-     echo "$tree" &&
-     echo nitfol >file0 &&
-     echo yomin >path1/file1 &&
-     after0=$(git hash-object file0) &&
-     after1=$(git hash-object path1/file1) &&
-     git update-index file0 path1/file1'
+test_expect_success setup '
+    echo frotz >file0 &&
+    mkdir path1 &&
+    echo rezrov >path1/file1 &&
+    before0=$(git hash-object file0) &&
+    before1=$(git hash-object path1/file1) &&
+    git update-index --add file0 path1/file1 &&
+    tree=$(git write-tree) &&
+    echo "$tree" &&
+    echo nitfol >file0 &&
+    echo yomin >path1/file1 &&
+    after0=$(git hash-object file0) &&
+    after1=$(git hash-object path1/file1) &&
+    git update-index file0 path1/file1
+'
 
 cat >expected <<\EOF
 EOF
-test_expect_success \
-    'limit to path should show nothing' \
-    'git diff-index --cached $tree -- path >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to path should show nothing' '
+    git diff-index --cached $tree -- path >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before1 $after1 M	path1/file1
 EOF
-test_expect_success \
-    'limit to path1 should show path1/file1' \
-    'git diff-index --cached $tree -- path1 >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to path1 should show path1/file1' '
+    git diff-index --cached $tree -- path1 >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before1 $after1 M	path1/file1
 EOF
-test_expect_success \
-    'limit to path1/ should show path1/file1' \
-    'git diff-index --cached $tree -- path1/ >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to path1/ should show path1/file1' '
+    git diff-index --cached $tree -- path1/ >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before1 $after1 M	path1/file1
 EOF
-test_expect_success \
-    '"*file1" should show path1/file1' \
-    'git diff-index --cached $tree -- "*file1" >current &&
-     compare_diff_raw current expected'
+test_expect_success '"*file1" should show path1/file1' '
+    git diff-index --cached $tree -- "*file1" >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<EOF
 :100644 100644 $before0 $after0 M	file0
 EOF
-test_expect_success \
-    'limit to file0 should show file0' \
-    'git diff-index --cached $tree -- file0 >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to file0 should show file0' '
+    git diff-index --cached $tree -- file0 >current &&
+    compare_diff_raw current expected
+'
 
 cat >expected <<\EOF
 EOF
-test_expect_success \
-    'limit to file0/ should emit nothing.' \
-    'git diff-index --cached $tree -- file0/ >current &&
-     compare_diff_raw current expected'
+test_expect_success 'limit to file0/ should emit nothing.' '
+    git diff-index --cached $tree -- file0/ >current &&
+    compare_diff_raw current expected
+'
 
 test_expect_success 'diff-tree pathspec' '
 	tree2=$(git write-tree) &&
-- 
2.53.0
Previous: Mark C. Chu-Carroll via B4 Relay
Message 5 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.