* [GSOC] [PATCH 0/3] t9700:moderizen test scripts
@ 2023-02-23 14:15 Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 1/3] t9700:fix title style Zhang Yi
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Zhang Yi @ 2023-02-23 14:15 UTC (permalink / raw)
To: git; +Cc: v.garg.work, Zhang Yi
The style of t9700-perl-git.sh is old.There are 3 things need improve:
* A title is not on the same line with test_expect_success command.
* A test body is indented by whitespaces.
* There are whitespaces after redirect operators.
---
Thanks for all suggestions.
Zhang Yi (3):
t9700:fix title style
t9700:change indents to TAB
t9700:delete whitespaces after redirect operators
t/t9700-perl-git.sh | 61 ++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 31 deletions(-)
--
2.29.0-rc0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [GSOC] [PATCH v2 1/3] t9700:fix title style
2023-02-23 14:15 [GSOC] [PATCH 0/3] t9700:moderizen test scripts Zhang Yi
@ 2023-02-23 14:15 ` Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 2/3] t9700:change indents to TAB Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 3/3] t9700:delete whitespaces after redirect operators Zhang Yi
2 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2023-02-23 14:15 UTC (permalink / raw)
To: git; +Cc: v.garg.work, Zhang Yi
One title in t9700-perl-git.sh is in old style where the
test_expect_success command and test title are written on
separate lines.
Combine the test_expect_success command and the title in one line.
Signed-off-by: Zhang Yi <18994118902@163.com>
---
t/t9700-perl-git.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b105d6d9d5..3f6396ef63 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -13,9 +13,8 @@ skip_all_if_no_Test_More
# set up test repository
-test_expect_success \
- 'set up test repository' \
- 'echo "test file 1" > file1 &&
+test_expect_success 'set up test repository' '
+ echo "test file 1" > file1 &&
echo "test file 2" > file2 &&
mkdir directory1 &&
echo "in directory1" >> directory1/file &&
--
2.29.0-rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [GSOC] [PATCH v2 2/3] t9700:change indents to TAB
2023-02-23 14:15 [GSOC] [PATCH 0/3] t9700:moderizen test scripts Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 1/3] t9700:fix title style Zhang Yi
@ 2023-02-23 14:15 ` Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 3/3] t9700:delete whitespaces after redirect operators Zhang Yi
2 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2023-02-23 14:15 UTC (permalink / raw)
To: git; +Cc: v.garg.work, Zhang Yi
The body of one test script in t9700-perl-git.sh is indented by spaces
while others are indented by TAB.And test bodies should be indented with
TAB, not spaces.
Replace all space indents by TAB.
Signed-off-by: Zhang Yi <18994118902@163.com>
---
t/t9700-perl-git.sh | 58 ++++++++++++++++++++++-----------------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index 3f6396ef63..671875a3fc 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -14,35 +14,35 @@ skip_all_if_no_Test_More
# set up test repository
test_expect_success 'set up test repository' '
- echo "test file 1" > file1 &&
- echo "test file 2" > file2 &&
- mkdir directory1 &&
- echo "in directory1" >> directory1/file &&
- mkdir directory2 &&
- echo "in directory2" >> directory2/file &&
- git add . &&
- git commit -m "first commit" &&
-
- echo "new file in subdir 2" > directory2/file2 &&
- git add . &&
- git commit -m "commit in directory2" &&
-
- echo "changed file 1" > file1 &&
- git commit -a -m "second commit" &&
-
- git config --add color.test.slot1 green &&
- git config --add test.string value &&
- git config --add test.dupstring value1 &&
- git config --add test.dupstring value2 &&
- git config --add test.booltrue true &&
- git config --add test.boolfalse no &&
- git config --add test.boolother other &&
- git config --add test.int 2k &&
- git config --add test.path "~/foo" &&
- git config --add test.pathexpanded "$HOME/foo" &&
- git config --add test.pathmulti foo &&
- git config --add test.pathmulti bar
- '
+ echo "test file 1" > file1 &&
+ echo "test file 2" > file2 &&
+ mkdir directory1 &&
+ echo "in directory1" >> directory1/file &&
+ mkdir directory2 &&
+ echo "in directory2" >> directory2/file &&
+ git add . &&
+ git commit -m "first commit" &&
+
+ echo "new file in subdir 2" > directory2/file2 &&
+ git add . &&
+ git commit -m "commit in directory2" &&
+
+ echo "changed file 1" > file1 &&
+ git commit -a -m "second commit" &&
+
+ git config --add color.test.slot1 green &&
+ git config --add test.string value &&
+ git config --add test.dupstring value1 &&
+ git config --add test.dupstring value2 &&
+ git config --add test.booltrue true &&
+ git config --add test.boolfalse no &&
+ git config --add test.boolother other &&
+ git config --add test.int 2k &&
+ git config --add test.path "~/foo" &&
+ git config --add test.pathexpanded "$HOME/foo" &&
+ git config --add test.pathmulti foo &&
+ git config --add test.pathmulti bar
+'
test_expect_success 'set up bare repository' '
git init --bare bare.git
--
2.29.0-rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [GSOC] [PATCH v2 3/3] t9700:delete whitespaces after redirect operators
2023-02-23 14:15 [GSOC] [PATCH 0/3] t9700:moderizen test scripts Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 1/3] t9700:fix title style Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 2/3] t9700:change indents to TAB Zhang Yi
@ 2023-02-23 14:15 ` Zhang Yi
2 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2023-02-23 14:15 UTC (permalink / raw)
To: git; +Cc: v.garg.work, Zhang Yi
There are whitespaces after redirect operators,which is a deprecated
style.
Delete whitespaces after redirect operators.
Signed-off-by: Zhang Yi <18994118902@163.com>
---
t/t9700-perl-git.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index 671875a3fc..ccc8212d73 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -14,20 +14,20 @@ skip_all_if_no_Test_More
# set up test repository
test_expect_success 'set up test repository' '
- echo "test file 1" > file1 &&
- echo "test file 2" > file2 &&
+ echo "test file 1" >file1 &&
+ echo "test file 2" >file2 &&
mkdir directory1 &&
- echo "in directory1" >> directory1/file &&
+ echo "in directory1" >>directory1/file &&
mkdir directory2 &&
- echo "in directory2" >> directory2/file &&
+ echo "in directory2" >>directory2/file &&
git add . &&
git commit -m "first commit" &&
- echo "new file in subdir 2" > directory2/file2 &&
+ echo "new file in subdir 2" >directory2/file2 &&
git add . &&
git commit -m "commit in directory2" &&
- echo "changed file 1" > file1 &&
+ echo "changed file 1" >file1 &&
git commit -a -m "second commit" &&
git config --add color.test.slot1 green &&
--
2.29.0-rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [GSOC] [PATCH v2 1/3] t9700:fix title style
2023-02-24 1:34 ` [GSOC] [PATCH v2 0/3] t9700:moderizen test scripts Zhang Yi
@ 2023-02-24 1:34 ` Zhang Yi
0 siblings, 0 replies; 5+ messages in thread
From: Zhang Yi @ 2023-02-24 1:34 UTC (permalink / raw)
To: git; +Cc: v.garg.work, Zhang Yi
One title in t9700-perl-git.sh is in old style where the
test_expect_success command and test title are written on
separate lines.
Combine the test_expect_success command and the title in one line.
Signed-off-by: Zhang Yi <18994118902@163.com>
---
t/t9700-perl-git.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b105d6d9d5..3f6396ef63 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -13,9 +13,8 @@ skip_all_if_no_Test_More
# set up test repository
-test_expect_success \
- 'set up test repository' \
- 'echo "test file 1" > file1 &&
+test_expect_success 'set up test repository' '
+ echo "test file 1" > file1 &&
echo "test file 2" > file2 &&
mkdir directory1 &&
echo "in directory1" >> directory1/file &&
--
2.29.0-rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-24 1:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-23 14:15 [GSOC] [PATCH 0/3] t9700:moderizen test scripts Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 1/3] t9700:fix title style Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 2/3] t9700:change indents to TAB Zhang Yi
2023-02-23 14:15 ` [GSOC] [PATCH v2 3/3] t9700:delete whitespaces after redirect operators Zhang Yi
-- strict thread matches above, loose matches on Subject: below --
2023-02-22 7:09 [GSOC] [PATCH v1 0/2] Modernize t9700 test script Vivan Garg
2023-02-24 1:34 ` [GSOC] [PATCH v2 0/3] t9700:moderizen test scripts Zhang Yi
2023-02-24 1:34 ` [GSOC] [PATCH v2 1/3] t9700:fix title style Zhang Yi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).