git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
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 3/3] [GSoC][Patch] area: t4202-log.sh, modernizing test script p3
Date: Tue, 19 Apr 2022 01:31:16 +0000	[thread overview]
Message-ID: <4f0f4619806b383f280e8f0d0b9000c189a3b540.1650331876.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1220.git.1650331876.gitgitgadget@gmail.com>

From: Jack McGuinness <jmcguinness2@ucmerced.edu>

Split up multiple lines on one line to multiple
Fix style of cd & echo in subshell

Signed-off-by: Jack McGuinness <jmcguinness2@ucmerced.edu>
---
 t/t4202-log.sh | 62 +++++++++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 18 deletions(-)

diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index fe3976829bb..604b275d6a8 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1756,13 +1756,20 @@ test_expect_success '--walk-reflogs --graph --no-graph works' '
 
 test_expect_success 'dotdot is a parent directory' '
 	mkdir -p a/b &&
-	( echo sixth && echo fifth ) >expect &&
-	( cd a/b && git log --format=%s .. ) >actual &&
+	(
+		echo sixth &&
+		echo fifth
+	) >expect &&
+	(
+		cd a/b &&
+		git log --format=%s ..
+	) >actual &&
 	test_cmp expect actual
 '
 
 test_expect_success GPG 'setup signed branch' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b signed main &&
 	echo foo >foo &&
 	git add foo &&
@@ -1770,7 +1777,8 @@ test_expect_success GPG 'setup signed branch' '
 '
 
 test_expect_success GPG 'setup signed branch with subkey' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b signed-subkey main &&
 	echo foo >foo &&
 	git add foo &&
@@ -1778,7 +1786,8 @@ test_expect_success GPG 'setup signed branch with subkey' '
 '
 
 test_expect_success GPGSM 'setup signed branch x509' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b signed-x509 main &&
 	echo foo >foo &&
 	git add foo &&
@@ -1790,7 +1799,8 @@ test_expect_success GPGSM 'setup signed branch x509' '
 test_expect_success GPGSSH 'setup sshkey signed branch' '
 	test_config gpg.format ssh &&
 	test_config user.signingkey "${GPGSSH_KEY_PRIMARY}" &&
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b signed-ssh main &&
 	echo foo >foo &&
 	git add foo &&
@@ -1802,16 +1812,24 @@ test_expect_success GPGSSH,GPGSSH_VERIFYTIME 'create signed commits with keys ha
 	touch file &&
 	git add file &&
 
-	echo expired >file && test_tick && git commit -a -m expired -S"${GPGSSH_KEY_EXPIRED}" &&
+	echo expired >file &&
+	test_tick &&
+	git commit -a -m expired -S"${GPGSSH_KEY_EXPIRED}" &&
 	git tag expired-signed &&
 
-	echo notyetvalid >file && test_tick && git commit -a -m notyetvalid -S"${GPGSSH_KEY_NOTYETVALID}" &&
+	echo notyetvalid >file &&
+	test_tick &&
+	git commit -a -m notyetvalid -S"${GPGSSH_KEY_NOTYETVALID}" &&
 	git tag notyetvalid-signed &&
 
-	echo timeboxedvalid >file && test_tick && git commit -a -m timeboxedvalid -S"${GPGSSH_KEY_TIMEBOXEDVALID}" &&
+	echo timeboxedvalid >file &&
+	test_tick &&
+	git commit -a -m timeboxedvalid -S"${GPGSSH_KEY_TIMEBOXEDVALID}" &&
 	git tag timeboxedvalid-signed &&
 
-	echo timeboxedinvalid >file && test_tick && git commit -a -m timeboxedinvalid -S"${GPGSSH_KEY_TIMEBOXEDINVALID}" &&
+	echo timeboxedinvalid >file &&
+	test_tick &&
+	git commit -a -m timeboxedinvalid -S"${GPGSSH_KEY_TIMEBOXEDINVALID}" &&
 	git tag timeboxedinvalid-signed
 '
 
@@ -1878,7 +1896,8 @@ test_expect_success GPGSSH,GPGSSH_VERIFYTIME 'log shows failure with commit date
 '
 
 test_expect_success GPG 'log --graph --show-signature for merged tag' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b plain main &&
 	echo aaa >bar &&
 	git add bar &&
@@ -1897,7 +1916,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag' '
 '
 
 test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b plain-shallow main &&
 	echo aaa >bar &&
 	git add bar &&
@@ -1917,7 +1937,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag in shallow
 '
 
 test_expect_success GPG 'log --graph --show-signature for merged tag with missing key' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b plain-nokey main &&
 	echo aaa >bar &&
 	git add bar &&
@@ -1936,7 +1957,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with missin
 '
 
 test_expect_success GPG 'log --graph --show-signature for merged tag with bad signature' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b plain-bad main &&
 	echo aaa >bar &&
 	git add bar &&
@@ -1958,7 +1980,8 @@ test_expect_success GPG 'log --graph --show-signature for merged tag with bad si
 '
 
 test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	git checkout -b plain-fail main &&
 	echo aaa >bar &&
 	git add bar &&
@@ -1977,7 +2000,8 @@ test_expect_success GPG 'log --show-signature for merged tag with GPG failure' '
 '
 
 test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	test_config gpg.format x509 &&
 	test_config user.signingkey $GIT_COMMITTER_EMAIL &&
 	git checkout -b plain-x509 main &&
@@ -1998,7 +2022,8 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509' '
 '
 
 test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 missing key' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	test_config gpg.format x509 &&
 	test_config user.signingkey $GIT_COMMITTER_EMAIL &&
 	git checkout -b plain-x509-nokey main &&
@@ -2019,7 +2044,8 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss
 '
 
 test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '
-	test_when_finished "git reset --hard && git checkout main" &&
+	test_when_finished "git reset --hard &&
+	git checkout main" &&
 	test_config gpg.format x509 &&
 	test_config user.signingkey $GIT_COMMITTER_EMAIL &&
 	git checkout -b plain-x509-bad main &&
-- 
gitgitgadget

  parent reply	other threads:[~2022-04-19  1:32 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 ` [PATCH 1/3] " Jack McGuinness via GitGitGadget
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 ` Jack McGuinness via GitGitGadget [this message]
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

  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=4f0f4619806b383f280e8f0d0b9000c189a3b540.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.
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).