tests: use "test_cmp", not "diff", when verifying the result
In tests, call test_cmp rather than raw diff where possible (i.e. if the output does not go to a pipe), to allow the use of, say, 'cmp' when the default 'diff -u' is not compatible with a vendor diff. When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS. Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d1b1a91946
commit
4fdf71be1c
@ -280,7 +280,7 @@ $expectfilter >expected <<\EOF
|
||||
EOF
|
||||
test_expect_success \
|
||||
'validate git diff-files output for a know cache/work tree state.' \
|
||||
'git diff-files >current && diff >/dev/null -b current expected'
|
||||
'git diff-files >current && test_cmp current expected >/dev/null'
|
||||
|
||||
test_expect_success \
|
||||
'git update-index --refresh should succeed.' \
|
||||
|
Reference in New Issue
Block a user