From: Junio C Hamano Date: Fri, 29 Feb 2008 23:50:03 GMT Subject: Re: [PATCH] t6024-recursive-merge.sh: hide spurious output when not running verbosely Message-ID: <7v1w6vb9w4.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > Hi, > > On Fri, 29 Feb 2008, Mike Hommey wrote: > >> diff --git a/t/t6024-recursive-merge.sh b/t/t6024-recursive-merge.sh >> index 149ea85..43b5f15 100755 >> --- a/t/t6024-recursive-merge.sh >> +++ b/t/t6024-recursive-merge.sh >> @@ -81,7 +81,7 @@ EOF >> >> test_expect_success "virtual trees were processed" "git diff expect out" >> >> -git reset --hard >> +git reset --hard >&3 2>&4 >> test_expect_success 'refuse to merge binary files' ' > > Would it not be _much_ more sensible to pull that command _into_ the > test_expect_success? Actually, I think this might be a bit more sensible approach. -- >8 -- tests: allow optional clean-up phrase to expect_success/failure When one test modifies the state of the test repository that the later tests may depend on, you may want to add a clean-up action that is run regardless of the outcome of the main part of the test. This can now be specified as the third parameter to test_expect_success and test_expect_failure functions. Signed-off-by: Junio C Hamano --- t/README | 13 +++++++++++-- t/t6024-recursive-merge.sh | 5 +++-- t/test-lib.sh | 32 ++++++++++++++++++++++++-------- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/t/README b/t/README index 73ed11b..de79c00 100644 --- a/t/README +++ b/t/README @@ -146,7 +146,7 @@ Test harness library There are a handful helper functions defined in the test harness library for your script to use. - - test_expect_success