From: Eric Sunshine <sunshine@sunshineco.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Johannes Sixt <j6t@kdbg.org>,
Jonathan Nieder <jrnieder@gmail.com>,
Jonathan Tan <jonathantanmy@google.com>,
Stefan Beller <sbeller@google.com>,
Junio C Hamano <gitster@pobox.com>,
Luke Diamand <luke@diamand.org>, Jeff King <peff@peff.net>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH 18/25] t3000-t3999: fix broken &&-chains
Date: Sun, 1 Jul 2018 20:23:58 -0400 [thread overview]
Message-ID: <20180702002405.3042-19-sunshine@sunshineco.com> (raw)
In-Reply-To: <20180702002405.3042-1-sunshine@sunshineco.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
t/t3000-ls-files-others.sh | 2 +-
t/t3006-ls-files-long.sh | 2 +-
t/t3008-ls-files-lazy-init-name-hash.sh | 8 ++++----
t/t3050-subprojects-fetch.sh | 8 ++++----
t/t3210-pack-refs.sh | 4 ++--
t/t3301-notes.sh | 8 ++++----
t/t3400-rebase.sh | 8 ++++----
t/t3402-rebase-merge.sh | 4 ++--
t/t3418-rebase-continue.sh | 4 ++--
t/t3700-add.sh | 8 ++++----
10 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index c525656b2c..afd4756134 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -84,7 +84,7 @@ test_expect_success SYMLINKS 'ls-files --others with symlinked submodule' '
) &&
(
cd super &&
- "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub
+ "$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub &&
git ls-files --others --exclude-standard >../actual
) &&
echo sub/ >expect &&
diff --git a/t/t3006-ls-files-long.sh b/t/t3006-ls-files-long.sh
index 202ad658b8..e109c3fbfb 100755
--- a/t/t3006-ls-files-long.sh
+++ b/t/t3006-ls-files-long.sh
@@ -29,7 +29,7 @@ test_expect_success 'overly-long path does not replace another by mistake' '
printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
git update-index --add --index-info &&
(
- echo "$path_a"
+ echo "$path_a" &&
echo "$path_z"
) >expect &&
git ls-files >actual &&
diff --git a/t/t3008-ls-files-lazy-init-name-hash.sh b/t/t3008-ls-files-lazy-init-name-hash.sh
index 08af596ba6..64f047332b 100755
--- a/t/t3008-ls-files-lazy-init-name-hash.sh
+++ b/t/t3008-ls-files-lazy-init-name-hash.sh
@@ -14,10 +14,10 @@ LAZY_THREAD_COST=2000
test_expect_success 'no buffer overflow in lazy_init_name_hash' '
(
- test_seq $LAZY_THREAD_COST | sed "s/^/a_/"
- echo b/b/b
- test_seq $LAZY_THREAD_COST | sed "s/^/c_/"
- test_seq 50 | sed "s/^/d_/" | tr "\n" "/"; echo d
+ test_seq $LAZY_THREAD_COST | sed "s/^/a_/" &&
+ echo b/b/b &&
+ test_seq $LAZY_THREAD_COST | sed "s/^/c_/" &&
+ test_seq 50 | sed "s/^/d_/" | tr "\n" "/" && echo d
) |
sed "s/^/100644 $EMPTY_BLOB /" |
git update-index --index-info &&
diff --git a/t/t3050-subprojects-fetch.sh b/t/t3050-subprojects-fetch.sh
index 2f5f41a012..f1f09abdd9 100755
--- a/t/t3050-subprojects-fetch.sh
+++ b/t/t3050-subprojects-fetch.sh
@@ -21,10 +21,10 @@ test_expect_success setup '
test_expect_success clone '
git clone "file://$(pwd)/.git" cloned &&
- (git rev-parse HEAD; git ls-files -s) >expected &&
+ (git rev-parse HEAD && git ls-files -s) >expected &&
(
cd cloned &&
- (git rev-parse HEAD; git ls-files -s) >../actual
+ (git rev-parse HEAD && git ls-files -s) >../actual
) &&
test_cmp expected actual
'
@@ -40,11 +40,11 @@ test_expect_success advance '
'
test_expect_success fetch '
- (git rev-parse HEAD; git ls-files -s) >expected &&
+ (git rev-parse HEAD && git ls-files -s) >expected &&
(
cd cloned &&
git pull &&
- (git rev-parse HEAD; git ls-files -s) >../actual
+ (git rev-parse HEAD && git ls-files -s) >../actual
) &&
test_cmp expected actual
'
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh
index afa27ffe2d..724b4b9bc0 100755
--- a/t/t3210-pack-refs.sh
+++ b/t/t3210-pack-refs.sh
@@ -231,9 +231,9 @@ test_expect_success 'timeout if packed-refs.lock exists' '
test_expect_success 'retry acquiring packed-refs.lock' '
LOCK=.git/packed-refs.lock &&
>"$LOCK" &&
- test_when_finished "wait; rm -f $LOCK" &&
+ test_when_finished "wait && rm -f $LOCK" &&
{
- ( sleep 1 ; rm -f $LOCK ) &
+ ( sleep 1 && rm -f $LOCK ) &
} &&
git -c core.packedrefstimeout=3000 pack-refs --all --prune
'
diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh
index 2d200fdf36..ac62dc0e8f 100755
--- a/t/t3301-notes.sh
+++ b/t/t3301-notes.sh
@@ -914,7 +914,7 @@ test_expect_success 'git notes copy --stdin' '
${indent}
${indent}yet another note
EOF
- (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
+ (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
git notes copy --stdin &&
git log -2 >actual &&
@@ -939,7 +939,7 @@ test_expect_success 'git notes copy --for-rewrite (unconfigured)' '
EOF
test_commit 14th &&
test_commit 15th &&
- (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
+ (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
git notes copy --for-rewrite=foo &&
git log -2 >actual &&
@@ -972,7 +972,7 @@ test_expect_success 'git notes copy --for-rewrite (enabled)' '
EOF
test_config notes.rewriteMode overwrite &&
test_config notes.rewriteRef "refs/notes/*" &&
- (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^); \
+ (echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
git notes copy --for-rewrite=foo &&
git log -2 >actual &&
@@ -1059,7 +1059,7 @@ test_expect_success 'git notes copy --for-rewrite (append two to one)' '
git notes add -f -m"append 2" HEAD^^ &&
test_config notes.rewriteMode concatenate &&
test_config notes.rewriteRef "refs/notes/*" &&
- (echo $(git rev-parse HEAD^) $(git rev-parse HEAD);
+ (echo $(git rev-parse HEAD^) $(git rev-parse HEAD) &&
echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 72d9564747..3996ee0135 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -200,10 +200,10 @@ test_expect_success 'rebase -q is quiet' '
test_expect_success 'Rebase a commit that sprinkles CRs in' '
(
- echo "One"
- echo "TwoQ"
- echo "Three"
- echo "FQur"
+ echo "One" &&
+ echo "TwoQ" &&
+ echo "Three" &&
+ echo "FQur" &&
echo "Five"
) | q_to_cr >CR &&
git add CR &&
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index 488945e007..a1ec501a87 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -25,7 +25,7 @@ test_expect_success setup '
git commit -a -m"master updates a bit more." &&
git checkout side &&
- (echo "0 $T" ; cat original) >renamed &&
+ (echo "0 $T" && cat original) >renamed &&
git add renamed &&
git update-index --force-remove original &&
git commit -a -m"side renames and edits." &&
@@ -143,7 +143,7 @@ test_expect_success 'rebase -s funny -Xopt' '
git checkout -b test-funny master^ &&
test_commit funny &&
(
- PATH=./test-bin:$PATH
+ PATH=./test-bin:$PATH &&
git rebase -s funny -Xopt master
) &&
test -f funny.was.run
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
index 03bf1b8a3b..853e015839 100755
--- a/t/t3418-rebase-continue.sh
+++ b/t/t3418-rebase-continue.sh
@@ -60,7 +60,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
EOF
chmod +x test-bin/git-merge-funny &&
(
- PATH=./test-bin:$PATH
+ PATH=./test-bin:$PATH &&
test_must_fail git rebase -s funny -Xopt master topic
) &&
test -f funny.was.run &&
@@ -68,7 +68,7 @@ test_expect_success 'rebase --continue remembers merge strategy and options' '
echo "Resolved" >F2 &&
git add F2 &&
(
- PATH=./test-bin:$PATH
+ PATH=./test-bin:$PATH &&
git rebase --continue
) &&
test -f funny.was.run
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 07af05d7ae..618750167a 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -156,9 +156,9 @@ test_expect_success 'git add with filemode=0, symlinks=0, and unmerged entries'
test_expect_success 'git add with filemode=0, symlinks=0 prefers stage 2 over stage 1' '
git rm --cached -f file symlink &&
(
- echo "100644 $(git hash-object -w stage1) 1 file"
- echo "100755 $(git hash-object -w stage2) 2 file"
- echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink"
+ echo "100644 $(git hash-object -w stage1) 1 file" &&
+ echo "100755 $(git hash-object -w stage2) 2 file" &&
+ echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink" &&
echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
) | git update-index --index-info &&
git config core.filemode 0 &&
@@ -265,7 +265,7 @@ test_expect_success 'git add to resolve conflicts on otherwise ignored path' '
git reset --hard &&
H=$(git rev-parse :1/2/a) &&
(
- echo "100644 $H 1 track-this"
+ echo "100644 $H 1 track-this" &&
echo "100644 $H 3 track-this"
) | git update-index --index-info &&
echo track-this >>.gitignore &&
--
2.18.0.203.gfac676dfb9
next prev parent reply other threads:[~2018-07-02 0:25 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 0:23 [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains Eric Sunshine
2018-07-02 0:23 ` [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually Eric Sunshine
2018-07-02 17:44 ` Stefan Beller
2018-07-02 20:58 ` Eric Sunshine
2018-07-03 19:20 ` Junio C Hamano
2018-07-02 0:23 ` [PATCH 02/25] t: use test_write_lines() instead of series of 'echo' commands Eric Sunshine
2018-07-02 17:53 ` Stefan Beller
2018-07-02 0:23 ` [PATCH 03/25] t: use sane_unset() rather than 'unset' with broken &&-chain Eric Sunshine
2018-07-02 0:23 ` [PATCH 04/25] t: drop unnecessary terminating semicolon in subshell Eric Sunshine
2018-07-03 19:23 ` Junio C Hamano
2018-07-02 0:23 ` [PATCH 05/25] t/lib-submodule-update: fix "absorbing" test Eric Sunshine
2018-07-02 0:23 ` [PATCH 06/25] t5405: use test_must_fail() instead of checking exit code manually Eric Sunshine
2018-07-02 0:23 ` [PATCH 07/25] t5406: use write_script() instead of birthing shell script manually Eric Sunshine
2018-07-02 0:23 ` [PATCH 08/25] t5505: modernize and simplify hard-to-digest test Eric Sunshine
2018-07-02 0:23 ` [PATCH 09/25] t6036: fix broken "merge fails but has appropriate contents" tests Eric Sunshine
2018-07-02 0:23 ` [PATCH 10/25] t7201: drop pointless "exit 0" at end of subshell Eric Sunshine
2018-07-02 0:23 ` [PATCH 11/25] t7400: fix broken "submodule add/reconfigure --force" test Eric Sunshine
2018-07-16 14:43 ` Johannes Schindelin
2018-07-16 15:51 ` Johannes Schindelin
2018-07-16 18:50 ` Eric Sunshine
2018-07-16 21:37 ` Junio C Hamano
2018-07-16 23:05 ` Eric Sunshine
2018-07-17 10:09 ` Johannes Schindelin
2018-07-17 17:53 ` Junio C Hamano
2018-07-02 0:23 ` [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison Eric Sunshine
2018-07-02 18:05 ` Stefan Beller
2018-07-02 21:12 ` Eric Sunshine
2018-07-02 0:23 ` [PATCH 13/25] t9001: fix broken "invoke hook" test Eric Sunshine
2018-07-02 0:23 ` [PATCH 14/25] t9814: simplify convoluted check that command correctly errors out Eric Sunshine
2018-07-02 0:23 ` [PATCH 15/25] t0000-t0999: fix broken &&-chains Eric Sunshine
2018-07-02 0:23 ` [PATCH 16/25] t1000-t1999: " Eric Sunshine
2018-07-02 0:23 ` [PATCH 17/25] t2000-t2999: " Eric Sunshine
2018-07-02 0:23 ` Eric Sunshine [this message]
2018-07-02 0:23 ` [PATCH 19/25] t3030: " Eric Sunshine
2018-07-02 0:24 ` [PATCH 20/25] t4000-t4999: " Eric Sunshine
2018-07-02 0:24 ` [PATCH 21/25] t5000-t5999: " Eric Sunshine
2018-07-12 12:37 ` SZEDER Gábor
2018-07-12 17:44 ` Eric Sunshine
2018-07-12 18:19 ` Jeff King
2018-07-12 18:31 ` Junio C Hamano
2018-07-12 18:35 ` Junio C Hamano
2018-07-12 18:46 ` Eric Sunshine
2018-07-12 18:50 ` Junio C Hamano
2018-07-12 18:53 ` Eric Sunshine
2018-07-17 8:15 ` SZEDER Gábor
2018-07-02 0:24 ` [PATCH 22/25] t6000-t6999: " Eric Sunshine
2018-07-02 0:24 ` [PATCH 23/25] t7000-t7999: " Eric Sunshine
2018-07-02 0:24 ` [PATCH 24/25] t9000-t9999: " Eric Sunshine
2018-07-02 0:24 ` [PATCH 25/25] t9119: " Eric Sunshine
2018-07-02 18:27 ` [PATCH 00/25] fix buggy tests, modernize tests, " Stefan Beller
2018-07-02 21:20 ` Eric Sunshine
2018-07-03 19:40 ` Junio C Hamano
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=20180702002405.3042-19-sunshine@sunshineco.com \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=jonathantanmy@google.com \
--cc=jrnieder@gmail.com \
--cc=luke@diamand.org \
--cc=newren@gmail.com \
--cc=peff@peff.net \
--cc=sbeller@google.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).