From: "Jack McGuinness via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jack McGuinness <jmcguinness2@ucmerced.edu>,
Jack McGuinness <jmcguinness2@ucmerced.edu>
Subject: [PATCH 1/3] [GSoC][Patch] area: t4202-log.sh, modernizing test script
Date: Tue, 19 Apr 2022 01:31:14 +0000 [thread overview]
Message-ID: <0c6aa4e9103b301556437d35acefa535a90e6a1e.1650331876.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1220.git.1650331876.gitgitgadget@gmail.com>
From: Jack McGuinness <jmcguinness2@ucmerced.edu>
Replace test body spaces with tabs where appropiate
Remove blank lines at start and and of test bodies.
Signed-off-by: Jack McGuinness <jmcguinness2@ucmerced.edu>
---
t/t4202-log.sh | 32 +++++---------------------------
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index be07407f855..c5d191356f1 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -15,7 +15,6 @@ test_cmp_graph () {
}
test_expect_success setup '
-
echo one >one &&
git add one &&
test_tick &&
@@ -44,31 +43,26 @@ test_expect_success setup '
git rm a/two &&
test_tick &&
git commit -m sixth
-
'
printf "sixth\nfifth\nfourth\nthird\nsecond\ninitial" > expect
test_expect_success 'pretty' '
-
git log --pretty="format:%s" > actual &&
test_cmp expect actual
'
printf "sixth\nfifth\nfourth\nthird\nsecond\ninitial\n" > expect
test_expect_success 'pretty (tformat)' '
-
git log --pretty="tformat:%s" > actual &&
test_cmp expect actual
'
test_expect_success 'pretty (shortcut)' '
-
git log --pretty="%s" > actual &&
test_cmp expect actual
'
test_expect_success 'format' '
-
git log --format="%s" > actual &&
test_cmp expect actual
'
@@ -83,13 +77,11 @@ cat > expect << EOF
EOF
test_expect_success 'format %w(11,1,2)' '
-
git log -2 --format="%w(11,1,2)This is the %s commit." > actual &&
test_cmp expect actual
'
test_expect_success 'format %w(,1,2)' '
-
git log -2 --format="%w(,1,2)This is%nthe %s%ncommit." > actual &&
test_cmp expect actual
'
@@ -103,47 +95,37 @@ $(git rev-parse --short :/second ) second
$(git rev-parse --short :/initial) initial
EOF
test_expect_success 'oneline' '
-
git log --oneline > actual &&
test_cmp expect actual
'
test_expect_success 'diff-filter=A' '
-
git log --no-renames --pretty="format:%s" --diff-filter=A HEAD > actual &&
git log --no-renames --pretty="format:%s" --diff-filter A HEAD > actual-separate &&
printf "fifth\nfourth\nthird\ninitial" > expect &&
test_cmp expect actual &&
test_cmp expect actual-separate
-
'
test_expect_success 'diff-filter=M' '
-
git log --pretty="format:%s" --diff-filter=M HEAD >actual &&
printf "second" >expect &&
test_cmp expect actual
-
'
test_expect_success 'diff-filter=D' '
-
git log --no-renames --pretty="format:%s" --diff-filter=D HEAD >actual &&
printf "sixth\nthird" >expect &&
test_cmp expect actual
-
'
test_expect_success 'diff-filter=R' '
-
git log -M --pretty="format:%s" --diff-filter=R HEAD >actual &&
printf "third" >expect &&
test_cmp expect actual
-
'
test_expect_success 'multiple --diff-filter bits' '
-
git log -M --pretty="format:%s" --diff-filter=R HEAD >expect &&
git log -M --pretty="format:%s" --diff-filter=Ra HEAD >actual &&
test_cmp expect actual &&
@@ -152,19 +134,15 @@ test_expect_success 'multiple --diff-filter bits' '
git log -M --pretty="format:%s" \
--diff-filter=a --diff-filter=R HEAD >actual &&
test_cmp expect actual
-
'
test_expect_success 'diff-filter=C' '
-
git log -C -C --pretty="format:%s" --diff-filter=C HEAD >actual &&
printf "fourth" >expect &&
test_cmp expect actual
-
'
test_expect_success 'git log --follow' '
-
git log --follow --pretty="format:%s" ichi >actual &&
printf "third\nsecond\ninitial" >expect &&
test_cmp expect actual
@@ -879,7 +857,7 @@ test_expect_success 'multiple decorate-refs' '
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs="heads/octopus*" \
--decorate-refs="tags/reach" >actual &&
- test_cmp expect.decorate actual
+ test_cmp expect.decorate actual
'
test_expect_success 'decorate-refs-exclude with glob' '
@@ -2190,10 +2168,10 @@ test_expect_success 'log --decorate includes all levels of tag annotated tags' '
'
test_expect_success 'log --end-of-options' '
- git update-ref refs/heads/--source HEAD &&
- git log --end-of-options --source >actual &&
- git log >expect &&
- test_cmp expect actual
+ git update-ref refs/heads/--source HEAD &&
+ git log --end-of-options --source >actual &&
+ git log >expect &&
+ test_cmp expect actual
'
test_expect_success 'set up commits with different authors' '
--
gitgitgadget
next prev parent reply other threads:[~2022-04-19 1:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-19 1:31 [PATCH 0/3] [GSoC][Patch] area: t4202-log.sh, modernizing test script Jack McGuinness via GitGitGadget
2022-04-19 1:31 ` Jack McGuinness via GitGitGadget [this message]
2022-04-19 1:31 ` [PATCH 2/3] [GSoC][Patch] area: t4202-log.sh, modernizing test script p2 Jack McGuinness via GitGitGadget
2022-04-19 1:31 ` [PATCH 3/3] [GSoC][Patch] area: t4202-log.sh, modernizing test script p3 Jack McGuinness via GitGitGadget
2022-04-19 5:26 ` [PATCH 0/3] [GSoC][Patch] area: t4202-log.sh, modernizing test script Bagas Sanjaya
2022-04-19 5:34 ` Jack McGuinness
2022-04-25 9:45 ` Christian Couder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c6aa4e9103b301556437d35acefa535a90e6a1e.1650331876.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=jmcguinness2@ucmerced.edu \
/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.
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 NNTP newsgroup(s).