summaryrefslogtreecommitdiff
path: root/t/t4125-apply-ws-fuzz.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2021-12-09 05:11:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-12-13 18:29:48 (GMT)
commitefe26b9ee09d53dda0f36d0ea20cb245b934f216 (patch)
treed5daf1aaf168c03129ef8b63cc1375cba959bdd2 /t/t4125-apply-ws-fuzz.sh
parent03949e33f58223dd2d8465f4dd8042e5e581fcef (diff)
downloadgit-efe26b9ee09d53dda0f36d0ea20cb245b934f216.zip
git-efe26b9ee09d53dda0f36d0ea20cb245b934f216.tar.gz
git-efe26b9ee09d53dda0f36d0ea20cb245b934f216.tar.bz2
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/t4125-apply-ws-fuzz.sh')
-rwxr-xr-xt/t4125-apply-ws-fuzz.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/t/t4125-apply-ws-fuzz.sh b/t/t4125-apply-ws-fuzz.sh
index 9671de7..090987c 100755
--- a/t/t4125-apply-ws-fuzz.sh
+++ b/t/t4125-apply-ws-fuzz.sh
@@ -10,10 +10,7 @@ test_expect_success setup '
git add file &&
# file-0 is full of whitespace breakages
- for l in a bb c d eeee f ggg h
- do
- echo "$l "
- done >file-0 &&
+ printf "%s \n" a bb c d eeee f ggg h >file-0 &&
# patch-0 creates a whitespace broken file
cat file-0 >file &&