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>
This commit is contained in:

committed by
Junio C Hamano

parent
8327974859
commit
0590ff26c4
@ -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
|
||||
'
|
||||
|
Reference in New Issue
Block a user