From 4a45f7dd49ba9a8943ad9b11fb7bed04f0cb4f15 Mon Sep 17 00:00:00 2001 From: Brian Gernhardt Date: Sat, 20 Mar 2010 04:29:11 -0400 Subject: Use test_expect_success for test setups Several tests did not use test_expect_success for their setup commands. Putting these start commands into the testing framework means both that errors during setup will be caught quickly and that non-error text will be suppressed without -v. Signed-off-by: Brian Gernhardt Signed-off-by: Junio C Hamano --- t/t4103-apply-binary.sh | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 't/t4103-apply-binary.sh') diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh index ad4cc1a757..9692f16f35 100755 --- a/t/t4103-apply-binary.sh +++ b/t/t4103-apply-binary.sh @@ -20,23 +20,25 @@ EOF cat file1 >file2 cat file1 >file4 -git update-index --add --remove file1 file2 file4 -git commit -m 'Initial Version' 2>/dev/null - -git checkout -b binary -perl -pe 'y/x/\000/' file3 -cat file3 >file4 -git add file2 -perl -pe 'y/\000/v/' file1 -rm -f file2 -git update-index --add --remove file1 file2 file3 file4 -git commit -m 'Second Version' - -git diff-tree -p master binary >B.diff -git diff-tree -p -C master binary >C.diff - -git diff-tree -p --binary master binary >BF.diff -git diff-tree -p --binary -C master binary >CF.diff +test_expect_success 'setup' " + git update-index --add --remove file1 file2 file4 && + git commit -m 'Initial Version' 2>/dev/null && + + git checkout -b binary && + perl -pe 'y/x/\000/' file3 && + cat file3 >file4 && + git add file2 && + perl -pe 'y/\000/v/' file1 && + rm -f file2 && + git update-index --add --remove file1 file2 file3 file4 && + git commit -m 'Second Version' && + + git diff-tree -p master binary >B.diff && + git diff-tree -p -C master binary >C.diff && + + git diff-tree -p --binary master binary >BF.diff && + git diff-tree -p --binary -C master binary >CF.diff +" test_expect_success 'stat binary diff -- should not fail.' \ 'git checkout master -- cgit v1.2.1