From 00648ba0505bbe1999bb6ae2f1d02a0ef923b191 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sun, 3 Oct 2010 14:00:14 -0600 Subject: Introduce sane_unset and use it to ensure proper && chaining Reviewed-by: Jonathan Nieder Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/README | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 't/README') diff --git a/t/README b/t/README index ee4c0cf685..2aceb67c78 100644 --- a/t/README +++ b/t/README @@ -259,14 +259,11 @@ Do: test ... That way all of the commands in your tests will succeed or fail. If - you must ignore the return value of something (e.g., the return - after unsetting a variable that was already unset is unportable) it's - best to indicate so explicitly with a semicolon: - - unset HLAGH; - git merge hla && - git push gh && - test ... + you must ignore the return value of something, consider using a + helper function (e.g. use sane_unset instead of unset, in order + to avoid unportable return value for unsetting a variable that was + already unset), or prepending the command with test_might_fail or + test_must_fail. - Check the test coverage for your tests. See the "Test coverage" below. -- cgit v1.2.1