diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-09 05:11:11 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-13 18:29:48 (GMT) |
commit | efe26b9ee09d53dda0f36d0ea20cb245b934f216 (patch) | |
tree | d5daf1aaf168c03129ef8b63cc1375cba959bdd2 /t/t4125-apply-ws-fuzz.sh | |
parent | 03949e33f58223dd2d8465f4dd8042e5e581fcef (diff) | |
download | git-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-x | t/t4125-apply-ws-fuzz.sh | 5 |
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 && |