From 4fdf71be1ca3a817851a14f91b75e7d30f885a48 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Fri, 14 May 2010 09:31:37 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- t/t5300-pack-object.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't/t5300-pack-object.sh') diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index 7649b810b..bbb9c1251 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -147,7 +147,7 @@ test_expect_success \ git cat-file $t $object || return 1 done current && - diff expect current' + test_cmp expect current' test_expect_success \ 'use packed deltified (REF_DELTA) objects' \ @@ -162,7 +162,7 @@ test_expect_success \ git cat-file $t $object || return 1 done current && - diff expect current' + test_cmp expect current' test_expect_success \ 'use packed deltified (OFS_DELTA) objects' \ @@ -177,7 +177,7 @@ test_expect_success \ git cat-file $t $object || return 1 done current && - diff expect current' + test_cmp expect current' unset GIT_OBJECT_DIRECTORY -- cgit v1.2.1