diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-09 06:11:05 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-13 19:29:48 +0100 |
commit | 0849541268a3aca9381591aed87b6864a203709b (patch) | |
tree | 00aa5e565425fd234928d17ad17e91c521d01d38 /t/t8003-blame-corner-cases.sh | |
parent | tests: simplify construction of large blocks of text (diff) | |
download | git-0849541268a3aca9381591aed87b6864a203709b.tar.xz git-0849541268a3aca9381591aed87b6864a203709b.zip |
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 '')
-rwxr-xr-x | t/t8003-blame-corner-cases.sh | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/t/t8003-blame-corner-cases.sh b/t/t8003-blame-corner-cases.sh index da80f815ce..d751d48b7d 100755 --- a/t/t8003-blame-corner-cases.sh +++ b/t/t8003-blame-corner-cases.sh @@ -13,14 +13,8 @@ test_expect_success setup ' echo B B B B B >two && echo C C C C C >tres && echo ABC >mouse && - for i in 1 2 3 4 5 6 7 8 9 - do - echo $i - done >nine_lines && - for i in 1 2 3 4 5 6 7 8 9 a - do - echo $i - done >ten_lines && + test_write_lines 1 2 3 4 5 6 7 8 9 >nine_lines && + test_write_lines 1 2 3 4 5 6 7 8 9 a >ten_lines && git add one two tres mouse nine_lines ten_lines && test_tick && GIT_AUTHOR_NAME=Initial git commit -m Initial && |