diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-09 05:11:05 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-13 18:29:48 (GMT) |
commit | 0849541268a3aca9381591aed87b6864a203709b (patch) | |
tree | 00aa5e565425fd234928d17ad17e91c521d01d38 /t/t4118-apply-empty-context.sh | |
parent | 020b813f400b55528edca00aff4d8e95080376f6 (diff) | |
download | git-0849541268a3aca9381591aed87b6864a203709b.zip git-0849541268a3aca9381591aed87b6864a203709b.tar.gz git-0849541268a3aca9381591aed87b6864a203709b.tar.bz2 |
tests: use test_write_lines() to generate line-oriented output
Take advantage of test_write_lines() to generate line-oriented output
rather than using for-loops or a series of `echo` commands. Not only is
test_write_lines() a natural fit for such a task, but there is less
opportunity for a broken &&-chain.
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/t4118-apply-empty-context.sh')
-rwxr-xr-x | t/t4118-apply-empty-context.sh | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/t/t4118-apply-empty-context.sh b/t/t4118-apply-empty-context.sh index 65f2e4c..1bce118 100755 --- a/t/t4118-apply-empty-context.sh +++ b/t/t4118-apply-empty-context.sh @@ -10,11 +10,7 @@ test_description='git apply with new style GNU diff with empty context . ./test-lib.sh test_expect_success setup ' - { - echo; echo; - echo A; echo B; echo C; - echo; - } >file1 && + test_write_lines "" "" A B C "" >file1 && cat file1 >file1.orig && { cat file1 && |