From: Zhang Yi <18994118902@163.com>
To: git@vger.kernel.org
Cc: v.garg.work@gmail.com, gitster@pobox.com, philipoakley@iee.email,
Zhang Yi <18994118902@163.com>
Subject: [GSOC] [PATCH v3 1/1] t9700: modernize test scripts
Date: Sat, 25 Feb 2023 09:30:03 +0800 [thread overview]
Message-ID: <20230225013003.1971931-1-18994118902@163.com> (raw)
In-Reply-To: <CADupsJPpZnjA=Pu_RZZZXy7Titj3UD7ppww48KvcHHHbrGx=rw@mail.gmail.com>
The style of t9700-perl-git.sh is old. There are 3 problems:
* 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.
Modernize test scripts by:
* Combine the title with test_expect_success command.
* Replace whitespace indents with TAB.
* Delete whitespaces after redirect operators.
Signed-off-by: Zhang Yi <18994118902@163.com>
---
Update compare to v2:
* Add summary between versions.
* Add space after colon in patch title.
* Add space after full stops and after comma.
* Combine 3 patches into 1.
After review 'First steps contributing to Git', I find it available to
send a single update patch for new version. I think this way is eaiser to
review.
Thanks for help from Junio C Hamano, Philip Oaklcy and again for Vivan
Garg.
t/t9700-perl-git.sh | 61 ++++++++++++++++++++++-----------------------
1 file changed, 30 insertions(+), 31 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b105d6d9d5..ccc8212d73 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -13,37 +13,36 @@ 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
- '
+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
+'
test_expect_success 'set up bare repository' '
git init --bare bare.git
--
2.29.0-rc0
prev parent reply other threads:[~2023-02-25 1:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 4:07 [GSOC] [PATCH v1 0/2] Modernize t9700 test script Zhang Yi
2023-02-22 4:07 ` [GSOC] [PATCH v1 1/2] Fix title style Zhang Yi
2023-02-22 7:13 ` Vivan Garg
2023-02-22 4:07 ` [GSOC] [PATCH v1 2/2] Change indents to TAB Zhang Yi
2023-02-22 7:24 ` Vivan Garg
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
2023-02-24 1:34 ` [GSOC] [PATCH v2 2/3] t9700:change indents to TAB Zhang Yi
2023-02-24 1:34 ` [GSOC] [PATCH v2 3/3] t9700:delete whitespaces after redirect operators Zhang Yi
2023-02-24 11:20 ` Philip Oakley
2023-02-24 2:49 ` [GSOC] [PATCH v2 0/3] t9700:moderizen test scripts Junio C Hamano
2023-02-24 3:31 ` Zhang Yi
2023-02-25 1:30 ` Zhang Yi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230225013003.1971931-1-18994118902@163.com \
--to=18994118902@163.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=philipoakley@iee.email \
--cc=v.garg.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).