Skip to content

Commit

Permalink
t5300-pack-object: do not compare binary data using test_cmp
Browse files Browse the repository at this point in the history
Users may set test_cmp to a comparison tool of their liking. The intent is
that the tool performs comparison of line-oriented texts. However, t5300
uses it also to compare binary data. Change those tests to use 'cmp'.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Oct 28, 2013
1 parent 3d092bf commit ce1a047
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions t/t5300-pack-object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ test_expect_success \
git cat-file $t $object || return 1
done <obj-list
} >current &&
test_cmp expect current'
cmp expect current'

test_expect_success \
'use packed deltified (REF_DELTA) objects' \
Expand All @@ -166,7 +166,7 @@ test_expect_success \
git cat-file $t $object || return 1
done <obj-list
} >current &&
test_cmp expect current'
cmp expect current'

test_expect_success \
'use packed deltified (OFS_DELTA) objects' \
Expand All @@ -181,7 +181,7 @@ test_expect_success \
git cat-file $t $object || return 1
done <obj-list
} >current &&
test_cmp expect current'
cmp expect current'

unset GIT_OBJECT_DIRECTORY

Expand All @@ -195,9 +195,9 @@ test_expect_success 'survive missing objects/pack directory' '
rm -fr $GOP &&
git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
test -f $GOP/pack-${packname_3}.pack &&
test_cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
test -f $GOP/pack-${packname_3}.idx &&
test_cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
test -f $GOP/pack-${packname_3}.keep
)
'
Expand Down

0 comments on commit ce1a047

Please sign in to comment.