Skip to content

Commit

Permalink
patch 8.1.2056: "make test" for indent files doesn't cause make to fail
Browse files Browse the repository at this point in the history
Problem:    "make test" for indent files doesn't cause make to fail.
Solution:   Exit the script with ":cquit". (Daniel Hahler, closes vim#4949)
  • Loading branch information
brammool committed Sep 18, 2019
1 parent 181d4f5 commit cd67059
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ src/testdir/messages
src/testdir/viminfo
src/testdir/opt_test.vim
runtime/indent/testdir/*.out
runtime/indent/testdir/*.fail
src/memfile_test
src/json_test
src/message_test
Expand Down
6 changes: 6 additions & 0 deletions runtime/indent/testdir/runtest.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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', '', '')

Expand Down Expand Up @@ -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
Expand All @@ -123,4 +125,8 @@ endfor
" Matching "if 1" at the start.
endif

if failed_count > 0
" have make report an error
cquit
endif
qall!
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2056,
/**/
2055,
/**/
Expand Down

0 comments on commit cd67059

Please sign in to comment.