patch 8.1.2056: "make test" for indent files doesn't cause make to fail

Problem:    "make test" for indent files doesn't cause make to fail.
Solution:   Exit the script with ":cquit". (Daniel Hahler, closes #4949)
This commit is contained in:
Bram Moolenaar
2019-09-18 22:14:43 +02:00
parent 181d4f58cc
commit cd67059c0c
3 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,7 @@ func HandleSwapExists()
endif
endfunc
let failed_count = 0
for fname in glob('testdir/*.in', 1, 1)
let root = substitute(fname, '\.in', '', '')
@ -110,6 +111,7 @@ for fname in glob('testdir/*.in', 1, 1)
endif
if failed
let failed_count += 1
exe 'write ' . root . '.fail'
echoerr 'Test ' . fname . ' FAILED!'
else
@ -123,4 +125,8 @@ endfor
" Matching "if 1" at the start.
endif
if failed_count > 0
" have make report an error
cquit
endif
qall!