aboutsummaryrefslogtreecommitdiffstats
path: root/t/t4025-hunk-header.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2021-12-09 00:11:11 -0500
committerJunio C Hamano <gitster@pobox.com>2021-12-13 10:29:48 -0800
commitefe26b9ee09d53dda0f36d0ea20cb245b934f216 (patch)
treed5daf1aaf168c03129ef8b63cc1375cba959bdd2 /t/t4025-hunk-header.sh
parent03949e33f58223dd2d8465f4dd8042e5e581fcef (diff)
downloadgit-efe26b9ee09d53dda0f36d0ea20cb245b934f216.tar.gz
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>
Diffstat (limited to 't/t4025-hunk-header.sh')
-rwxr-xr-xt/t4025-hunk-header.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh
index 6356961de4..5397cb7d42 100755
--- a/t/t4025-hunk-header.sh
+++ b/t/t4025-hunk-header.sh
@@ -14,15 +14,9 @@ test_expect_success setup '
(
echo "A $NS" &&
- for c in B C D E F G H I J K
- do
- echo " $c"
- done &&
+ printf " %s\n" B C D E F G H I J K &&
echo "L $NS" &&
- for c in M N O P Q R S T U V
- do
- echo " $c"
- done
+ printf " %s\n" M N O P Q R S T U V
) >file &&
git add file &&