Skip to content

Commit f957f03

Browse files
sunshinecogitster
authored andcommitted
t4000-t4999: fix broken &&-chains
Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6c32f6 commit f957f03

6 files changed

+17
-17
lines changed

t/t4001-diff-rename.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ test_expect_success 'setup for many rename source candidates' '
180180
git add "path??" &&
181181
test_tick &&
182182
git commit -m "hundred" &&
183-
(cat path1; echo new) >new-path &&
183+
(cat path1 && echo new) >new-path &&
184184
echo old >>path1 &&
185185
git add new-path path1 &&
186186
git diff -l 4 -C -C --cached --name-status >actual 2>actual.err &&

t/t4024-diff-optimize-common.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ test_expect_success setup '
127127
128128
for n in $sample
129129
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 &&
134134
135135
git add file-a$n file-b$n file-c$n file-d$n &&
136136
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 &&
141141
142142
expect_pattern $n || return 1
143143

t/t4025-hunk-header.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ NS="$N$N$N$N$N$N$N$N$N$N$N$N$N"
1212
test_expect_success setup '
1313
1414
(
15-
echo "A $NS"
15+
echo "A $NS" &&
1616
for c in B C D E F G H I J K
1717
do
1818
echo " $c"
19-
done
20-
echo "L $NS"
19+
done &&
20+
echo "L $NS" &&
2121
for c in M N O P Q R S T U V
2222
do
2323
echo " $c"
@@ -34,7 +34,7 @@ test_expect_success 'hunk header truncation with an overly long line' '
3434
3535
git diff | sed -n -e "s/^.*@@//p" >actual &&
3636
(
37-
echo " A $N$N$N$N$N$N$N$N$N2"
37+
echo " A $N$N$N$N$N$N$N$N$N2" &&
3838
echo " L $N$N$N$N$N$N$N$N$N1"
3939
) >expected &&
4040
test_cmp actual expected

t/t4041-diff-submodule-option.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ test_expect_success 'given commit --submodule=short' '
498498
test_expect_success 'setup .git file for sm2' '
499499
(cd sm2 &&
500500
REAL="$(pwd)/../.real" &&
501-
mv .git "$REAL"
501+
mv .git "$REAL" &&
502502
echo "gitdir: $REAL" >.git)
503503
'
504504

@@ -527,7 +527,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '
527527
git commit -m "sub a"
528528
) &&
529529
(cd sub_alt &&
530-
sha1_before=$(git rev-parse --short HEAD)
530+
sha1_before=$(git rev-parse --short HEAD) &&
531531
echo b >b &&
532532
git add b &&
533533
git commit -m b &&

t/t4060-diff-submodule-option-diff-format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ test_expect_success 'given commit' '
721721
test_expect_success 'setup .git file for sm2' '
722722
(cd sm2 &&
723723
REAL="$(pwd)/../.real" &&
724-
mv .git "$REAL"
724+
mv .git "$REAL" &&
725725
echo "gitdir: $REAL" >.git)
726726
'
727727

t/t4121-apply-diffs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ test_expect_success 'setup' \
2727

2828
test_expect_success \
2929
'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'
3131

3232
test_done

0 commit comments

Comments
 (0)