t4000-t4999: fix broken &&-chains

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Jul 1, 2018 at 20:24 UTC f957f03b60163ffdc346cce44a67b0347a51190b
6 files changed +17 -17
t/t4001-diff-rename.sh
+1 -1
@@ -180,7 +180,7 @@ test_expect_success 'setup for many rename source candidates' '
180 git add "path??" &&
181 test_tick &&
182 git commit -m "hundred" &&
183 - (cat path1; echo new) >new-path &&
183 + (cat path1 && echo new) >new-path &&
184 echo old >>path1 &&
185 git add new-path path1 &&
186 git diff -l 4 -C -C --cached --name-status >actual 2>actual.err &&
t/t4024-diff-optimize-common.sh
+8 -8
@@ -127,17 +127,17 @@ test_expect_success setup '
127
128 for n in $sample
129 do
130 - ( zs $n ; echo a ) >file-a$n &&
131 - ( echo b; zs $n; echo ) >file-b$n &&
132 - ( printf c; zs $n ) >file-c$n &&
133 - ( echo d; zs $n ) >file-d$n &&
130 + ( zs $n && echo a ) >file-a$n &&
131 + ( echo b && zs $n && echo ) >file-b$n &&
132 + ( printf c && zs $n ) >file-c$n &&
133 + ( echo d && zs $n ) >file-d$n &&
134
135 git add file-a$n file-b$n file-c$n file-d$n &&
136
137 - ( zs $n ; echo A ) >file-a$n &&
138 - ( echo B; zs $n; echo ) >file-b$n &&
139 - ( printf C; zs $n ) >file-c$n &&
140 - ( echo D; zs $n ) >file-d$n &&
137 + ( zs $n && echo A ) >file-a$n &&
138 + ( echo B && zs $n && echo ) >file-b$n &&
139 + ( printf C && zs $n ) >file-c$n &&
140 + ( echo D && zs $n ) >file-d$n &&
141
142 expect_pattern $n || return 1
143
t/t4025-hunk-header.sh
+4 -4
@@ -12,12 +12,12 @@ NS="$N$N$N$N$N$N$N$N$N$N$N$N$N"
12 test_expect_success setup '
13
14 (
15 - echo "A $NS"
15 + echo "A $NS" &&
16 for c in B C D E F G H I J K
17 do
18 echo " $c"
19 - done
20 - echo "L $NS"
19 + done &&
20 + echo "L $NS" &&
21 for c in M N O P Q R S T U V
22 do
23 echo " $c"
@@ -34,7 +34,7 @@ test_expect_success 'hunk header truncation with an overly long line' '
34
35 git diff | sed -n -e "s/^.*@@//p" >actual &&
36 (
37 - echo " A $N$N$N$N$N$N$N$N$N2"
37 + echo " A $N$N$N$N$N$N$N$N$N2" &&
38 echo " L $N$N$N$N$N$N$N$N$N1"
39 ) >expected &&
40 test_cmp actual expected
t/t4041-diff-submodule-option.sh
+2 -2
@@ -498,7 +498,7 @@ test_expect_success 'given commit --submodule=short' '
498 test_expect_success 'setup .git file for sm2' '
499 (cd sm2 &&
500 REAL="$(pwd)/../.real" &&
501 - mv .git "$REAL"
501 + mv .git "$REAL" &&
502 echo "gitdir: $REAL" >.git)
503 '
504
@@ -527,7 +527,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '
527 git commit -m "sub a"
528 ) &&
529 (cd sub_alt &&
530 - sha1_before=$(git rev-parse --short HEAD)
530 + sha1_before=$(git rev-parse --short HEAD) &&
531 echo b >b &&
532 git add b &&
533 git commit -m b &&
t/t4060-diff-submodule-option-diff-format.sh
+1 -1
@@ -721,7 +721,7 @@ test_expect_success 'given commit' '
721 test_expect_success 'setup .git file for sm2' '
722 (cd sm2 &&
723 REAL="$(pwd)/../.real" &&
724 - mv .git "$REAL"
724 + mv .git "$REAL" &&
725 echo "gitdir: $REAL" >.git)
726 '
727
t/t4121-apply-diffs.sh
+1 -1
@@ -27,6 +27,6 @@ test_expect_success 'setup' \
27
28 test_expect_success \
29 'check if contextually independent diffs for the same file apply' \
30 - '( git diff test~2 test~1; git diff test~1 test~0 )| git apply'
30 + '( git diff test~2 test~1 && git diff test~1 test~0 )| git apply'
31
32 test_done