tests: simplify by dropping unnecessary for
loops
Rather than manually looping over a set of items and plugging those items into a template string which is printed repeatedly, achieve the same effect by taking advantage of `printf` which loops over its arguments automatically. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
03949e33f5
commit
efe26b9ee0
@ -591,7 +591,7 @@ test_expect_success 'cvs annotate' '
|
||||
cd cvswork &&
|
||||
GIT_CONFIG="$git_config" cvs annotate merge >../out &&
|
||||
sed -e "s/ .*//" ../out >../actual &&
|
||||
for i in 3 1 1 1 1 1 1 1 2 4; do echo 1.$i; done >../expect &&
|
||||
printf "1.%d\n" 3 1 1 1 1 1 1 1 2 4 >../expect &&
|
||||
test_cmp ../expect ../actual
|
||||
'
|
||||
|
||||
|
Reference in New Issue
Block a user