Tests: use test_cmp instead of diff where possible
Several old tests were written before test_cmp was introduced, convert these to test_cmp. If were are at it, fix the order of the arguments where necessary to make expected come first, so the command shows how the test result deviates from the correct output. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
dcb11263bc
commit
188c3827c1
@ -127,7 +127,7 @@ cat >expected <<\EOF
|
||||
EOF
|
||||
test_expect_success \
|
||||
'validate git ls-files output for a known tree.' \
|
||||
'diff current expected'
|
||||
'test_cmp expected current'
|
||||
|
||||
test_expect_success \
|
||||
'writing tree out with git write-tree.' \
|
||||
@ -147,7 +147,7 @@ cat >expected <<\EOF
|
||||
EOF
|
||||
test_expect_success \
|
||||
'git ls-tree output for a known tree.' \
|
||||
'diff current expected'
|
||||
'test_cmp expected current'
|
||||
|
||||
# This changed in ls-tree pathspec change -- recursive does
|
||||
# not show tree nodes anymore.
|
||||
@ -166,7 +166,7 @@ cat >expected <<\EOF
|
||||
EOF
|
||||
test_expect_success \
|
||||
'git ls-tree -r output for a known tree.' \
|
||||
'diff current expected'
|
||||
'test_cmp expected current'
|
||||
|
||||
# But with -r -t we can have both.
|
||||
test_expect_success \
|
||||
@ -187,7 +187,7 @@ cat >expected <<\EOF
|
||||
EOF
|
||||
test_expect_success \
|
||||
'git ls-tree -r output for a known tree.' \
|
||||
'diff current expected'
|
||||
'test_cmp expected current'
|
||||
|
||||
test_expect_success \
|
||||
'writing partial tree out with git write-tree --prefix.' \
|
||||
|
||||
Reference in New Issue
Block a user