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

[PATCH] [GSoC]t7501:modernize the style of test body

From
ashutosh.pandeyhlr007@gmail.com <ashutosh.pandeyhlr007@gmail.com>
Date
Feb 21, 2023, 12:28 UTC
Message-ID
<20230221122816.10236-1-ashutosh.pandeyhlr007@gmail.com>
From: Ashutosh Pandey <ashutosh.pandeyhlr007@gmail.com>

some of the test body followed the old style of test body which isn't consistent with the new rules which is that multiple commands on one line should be split across multiple lines this patch accomplishes that in this test script that is t7501.

Signed-off-by: Ashutosh Pandey <ashutosh.pandeyhlr007@gmail.com>
---
 t/t7501-commit-basic-functionality.sh | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/t/t7501-commit-basic-functionality.sh b/t/t7501-commit-basic-functionality.sh
index fb5417d5e7..c31d6f53f4 100755
--- a/t/t7501-commit-basic-functionality.sh
+++ b/t/t7501-commit-basic-functionality.sh
@@ -33,12 +33,16 @@ test_expect_success 'setup: initial commit' '
 '
 
 test_expect_success '-m and -F do not mix' '
-	git checkout HEAD file && echo >>file && git add file &&
+	git checkout HEAD file &&
+	echo >>file && 
+	git add file &&
 	test_must_fail git commit -m foo -m bar -F file
 '
 
 test_expect_success '-m and -C do not mix' '
-	git checkout HEAD file && echo >>file && git add file &&
+	git checkout HEAD file &&
+	echo >>file && 
+	git add file &&
 	test_must_fail git commit -C HEAD -m illegal
 '
 
@@ -134,18 +138,24 @@ test_expect_success 'empty commit message' '
 '
 
 test_expect_success 'template "emptyness" check does not kick in with -F' '
-	git checkout HEAD file && echo >>file && git add file &&
+	git checkout HEAD file &&
+	echo >>file && 
+	git add file &&
 	git commit -t file -F file
 '
 
 test_expect_success 'template "emptyness" check' '
-	git checkout HEAD file && echo >>file && git add file &&
+	git checkout HEAD file && 
+	echo >>file && 
+	git add file &&
 	test_must_fail git commit -t file 2>err &&
 	test_i18ngrep "did not edit" err
 '
 
 test_expect_success 'setup: commit message from file' '
-	git checkout HEAD file && echo >>file && git add file &&
+	git checkout HEAD file && 
+	echo >>file && 
+	git add file &&
 	echo this is the commit message, coming from a file >msg &&
 	git commit -F msg -a
 '

base-commit: d9d677b2d8cc5f70499db04e633ba7a400f64cbf
-- 
2.39.2
Message 1 of 1 in “[GSoC]t7501:modernize the style of test body”
  1. [GSoC]t7501:modernize the style of test bodyashutosh.pandeyhlr007@gmail.com, Feb 21, 2023

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.