aboutsummaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2010-10-03 14:00:14 -0600
committerJunio C Hamano <gitster@pobox.com>2010-10-06 13:26:33 -0700
commit00648ba0505bbe1999bb6ae2f1d02a0ef923b191 (patch)
treea6bd5229da9fd44b8f29be12cb900d3ef8500868 /t/README
parentbc0f35ca238ff88829cd9839641a316e859348a2 (diff)
downloadgit-00648ba0505bbe1999bb6ae2f1d02a0ef923b191.tar.gz
git-00648ba0505bbe1999bb6ae2f1d02a0ef923b191.tar.xz
Introduce sane_unset and use it to ensure proper && chaining
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/README')
-rw-r--r--t/README13
1 files changed, 5 insertions, 8 deletions
diff --git a/t/README b/t/README
index ee4c0cf68..2aceb67c7 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.