diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2018-07-02 03:23:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-03 22:38:04 +0300 |
commit | 0590ff26c406204281262c2753b3b92aa07f59c7 (patch) | |
tree | 59857964cf6ade6e1600e150e795e3ae4d347210 /t/t0090-cache-tree.sh | |
parent | 83279748594cf1c7a38ebf518cd6b63cd3d8de37 (diff) |
t: use test_write_lines() instead of series of 'echo' commands
These tests employ a noisy subshell (with missing &&-chain) to feed
input into Git commands or files:
(echo a; echo b; echo c) | git some-command ...
Simplify by taking advantage of test_write_lines():
test_write_lines a b c | git some-command ...
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0090-cache-tree.sh')
-rwxr-xr-x | t/t0090-cache-tree.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index 0c61268fd2..28ea93f509 100755 --- a/t/t0090-cache-tree.sh +++ b/t/t0090-cache-tree.sh @@ -156,7 +156,7 @@ test_expect_success PERL 'commit --interactive gives cache-tree on partial commi return 44; } EOT - (echo p; echo 1; echo; echo s; echo n; echo y; echo q) | + test_write_lines p 1 "" s n y q | git commit --interactive -m foo && test_cache_tree ' |