Skip to content

Commit 09fb535

Browse files
committed
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
2 parents c473af7 + 99a64e4 commit 09fb535

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/test-lib.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,9 @@ test_run_ () {
625625
trace=
626626
# 117 is magic because it is unlikely to match the exit
627627
# code of other programs
628-
test_eval_ "(exit 117) && $1"
629-
if test "$?" != 117; then
630-
error "bug in the test script: broken &&-chain: $1"
628+
if test "OK-117" != "$(test_eval_ "(exit 117) && $1${LF}${LF}echo OK-\$?" 3>&1)"
629+
then
630+
error "bug in the test script: broken &&-chain or run-away HERE-DOC: $1"
631631
fi
632632
trace=$trace_tmp
633633
fi

0 commit comments

Comments
 (0)