filter-trees: code clean-up of tests

A few trivial updates to test to match the current best practices.

 - avoid "grep -q" that strips potentially useful output from tests
   running under "-v".

 - use test_write_lines to prepare multi-line expected output file.

 - reserve use of test_must_fail to "git" commands.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Matthew DeVore
2018-10-12 13:01:41 -07:00
committed by Junio C Hamano
parent bc5975d24f
commit d9e6d0942b
3 changed files with 5 additions and 5 deletions

View File

@ -192,7 +192,7 @@ test_expect_success 'use fsck before and after manually fetching a missing subtr
xargs -n1 git -C dst cat-file -t >fetched_types &&
sort -u fetched_types >unique_types.observed &&
printf "blob\ncommit\ntree\n" >unique_types.expected &&
test_write_lines blob commit tree >unique_types.expected &&
test_cmp unique_types.expected unique_types.observed
'