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
- value of export is unportable) it's best to indicate so explicitly
- with a semicolon:
+ 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:
- export HLAGH;
+ unset HLAGH;
git merge hla &&
git push gh &&
test ...
- test_must_fail <git-command>
Run a git command and ensure it fails in a controlled way. Use
- this instead of "! <git-command>" to fail when git commands
- segfault.
+ this instead of "! <git-command>". When git-command dies due to a
+ segfault, test_must_fail diagnoses it as an error; "! <git-command>"
+ treats it as just another expected failure, which would let such a
+ bug go unnoticed.
- test_might_fail <git-command>