summaryrefslogtreecommitdiff
path: root/command-list.txt
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2013-10-11 10:35:46 -0700
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2013-10-11 10:35:46 -0700
commit59c222052801a55bb40a78378ea19c6b7c4ec45d (patch)
treea4d161185433e059aa53a66c5efeba53c04b68d3 /command-list.txt
parentMerge branch 'tz/credential-netrc' (diff)
downloadtgif-59c222052801a55bb40a78378ea19c6b7c4ec45d.tar.xz
status test: add missing && to <<EOF blocks
When a test forgets to include && after each command, it is possible for an early command to succeed but the test to fail, which can hide bugs. Checked using the following patch to the test harness: --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -425,7 +425,17 @@ test_eval_ () { eval </dev/null >&3 2>&4 "$*" } +check_command_chaining_ () { + eval >&3 2>&4 "(exit 189) && $*" + eval_chain_ret=$? + if test "$eval_chain_ret" != 189 + then + error 'bug in test script: missing "&&" in test commands' + fi +} + test_run_ () { + check_command_chaining_ "$1" test_cleanup=: expecting_failure=$2 setup_malloc_check Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'command-list.txt')
0 files changed, 0 insertions, 0 deletions