summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-27 17:59:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-27 17:59:25 (GMT)
commit09fb53568e3e00e30891b118045aa07ede524103 (patch)
tree3e449b5c7af0175639393f0556731bd97d983d76
parentc473af7396b9d5ac39d1164434788fef6da80919 (diff)
parent99a64e4b73c38b5cb32dea5d4bd71c70079cae15 (diff)
downloadgit-09fb53568e3e00e30891b118045aa07ede524103.zip
git-09fb53568e3e00e30891b118045aa07ede524103.tar.gz
git-09fb53568e3e00e30891b118045aa07ede524103.tar.bz2
Merge branch 'jc/lint-runaway-here-doc'
The test framework learned to detect unterminated here documents. * jc/lint-runaway-here-doc: tests: lint for run-away here-doc
-rw-r--r--t/test-lib.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 23c29bc..13b5696 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -625,9 +625,9 @@ test_run_ () {
trace=
# 117 is magic because it is unlikely to match the exit
# code of other programs
- test_eval_ "(exit 117) && $1"
- if test "$?" != 117; then
- error "bug in the test script: broken &&-chain: $1"
+ if test "OK-117" != "$(test_eval_ "(exit 117) && $1${LF}${LF}echo OK-\$?" 3>&1)"
+ then
+ error "bug in the test script: broken &&-chain or run-away HERE-DOC: $1"
fi
trace=$trace_tmp
fi