Skip to content

Commit e832f73

Browse files
committed
t9814: fix misconversion from test $a -o $b to test $a || test $b
Spotted-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6a06623 commit e832f73

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

t/t9814-git-p4-rename.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ test_expect_success 'detect copies' '
177177
level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C0*//") &&
178178
test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 &&
179179
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
180-
test "$src" = file10 || test "$src" = file11 &&
180+
case "$src" in
181+
file10 | file11) : ;; # happy
182+
*) false ;; # not
183+
&&
181184
git config git-p4.detectCopies $(($level + 2)) &&
182185
git p4 submit &&
183186
p4 filelog //depot/file12 &&
@@ -191,7 +194,10 @@ test_expect_success 'detect copies' '
191194
level=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/C0*//") &&
192195
test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 &&
193196
src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
194-
test "$src" = file10 || test "$src" = file11 || test "$src" = file12 &&
197+
case "$src" in
198+
file10 | file11 | file12) : ;; # happy
199+
*) false ;; # not
200+
&&
195201
git config git-p4.detectCopies $(($level - 2)) &&
196202
git p4 submit &&
197203
p4 filelog //depot/file13 &&

0 commit comments

Comments
 (0)