diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2021-12-09 08:11:05 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-13 21:29:48 +0300 |
commit | 0849541268a3aca9381591aed87b6864a203709b (patch) | |
tree | 00aa5e565425fd234928d17ad17e91c521d01d38 /t/t5611-clone-config.sh | |
parent | 020b813f400b55528edca00aff4d8e95080376f6 (diff) |
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/t5611-clone-config.sh')
-rwxr-xr-x | t/t5611-clone-config.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t5611-clone-config.sh b/t/t5611-clone-config.sh index f8625f9158..4b3877216e 100755 --- a/t/t5611-clone-config.sh +++ b/t/t5611-clone-config.sh @@ -17,7 +17,7 @@ test_expect_success 'clone -c sets config in cloned repo' ' test_expect_success 'clone -c can set multi-keys' ' rm -rf child && git clone -c core.foo=bar -c core.foo=baz . child && - { echo bar; echo baz; } >expect && + test_write_lines bar baz >expect && git --git-dir=child/.git config --get-all core.foo >actual && test_cmp expect actual ' |