Browse Source

Merge branch 'jk/test-chain-lint'

Developer support to automatically detect broken &&-chain in the
test scripts is now turned on by default.

* jk/test-chain-lint:
  test-lib: turn on GIT_TEST_CHAIN_LINT by default
  t7502-commit.sh: fix a broken and-chain
maint
Junio C Hamano 10 years ago
parent
commit
da3d507ce0
  1. 2
      t/t7502-commit.sh
  2. 2
      t/test-lib.sh

2
t/t7502-commit.sh

@ -370,7 +370,7 @@ exit 0
EOF EOF


test_expect_success !AUTOIDENT 'do not fire editor when committer is bogus' ' test_expect_success !AUTOIDENT 'do not fire editor when committer is bogus' '
>.git/result >.git/result &&
>expect && >expect &&


echo >>negative && echo >>negative &&

2
t/test-lib.sh

@ -529,7 +529,7 @@ test_run_ () {
test_cleanup=: test_cleanup=:
expecting_failure=$2 expecting_failure=$2


if test "${GIT_TEST_CHAIN_LINT:-0}" != 0; then if test "${GIT_TEST_CHAIN_LINT:-1}" != 0; then
# 117 is magic because it is unlikely to match the exit # 117 is magic because it is unlikely to match the exit
# code of other programs # code of other programs
test_eval_ "(exit 117) && $1" test_eval_ "(exit 117) && $1"

Loading…
Cancel
Save