Skip to content

Commit cd67059

Browse files
committed
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)
1 parent 181d4f5 commit cd67059

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ src/testdir/messages
7777
src/testdir/viminfo
7878
src/testdir/opt_test.vim
7979
runtime/indent/testdir/*.out
80+
runtime/indent/testdir/*.fail
8081
src/memfile_test
8182
src/json_test
8283
src/message_test

runtime/indent/testdir/runtest.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func HandleSwapExists()
2020
endif
2121
endfunc
2222

23+
let failed_count = 0
2324
for fname in glob('testdir/*.in', 1, 1)
2425
let root = substitute(fname, '\.in', '', '')
2526

@@ -110,6 +111,7 @@ for fname in glob('testdir/*.in', 1, 1)
110111
endif
111112

112113
if failed
114+
let failed_count += 1
113115
exe 'write ' . root . '.fail'
114116
echoerr 'Test ' . fname . ' FAILED!'
115117
else
@@ -123,4 +125,8 @@ endfor
123125
" Matching "if 1" at the start.
124126
endif
125127

128+
if failed_count > 0
129+
" have make report an error
130+
cquit
131+
endif
126132
qall!

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ static char *(features[]) =
757757

758758
static int included_patches[] =
759759
{ /* Add new patch number below this line */
760+
/**/
761+
2056,
760762
/**/
761763
2055,
762764
/**/

0 commit comments

Comments
 (0)