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)
diff --git a/.gitignore b/.gitignore
index 230401f..0fd5ba0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,6 +77,7 @@
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
diff --git a/runtime/indent/testdir/runtest.vim b/runtime/indent/testdir/runtest.vim
index 0f00514..9502c42 100644
--- a/runtime/indent/testdir/runtest.vim
+++ b/runtime/indent/testdir/runtest.vim
@@ -20,6 +20,7 @@
endif
endfunc
+let failed_count = 0
for fname in glob('testdir/*.in', 1, 1)
let root = substitute(fname, '\.in', '', '')
@@ -110,6 +111,7 @@
endif
if failed
+ let failed_count += 1
exe 'write ' . root . '.fail'
echoerr 'Test ' . fname . ' FAILED!'
else
@@ -123,4 +125,8 @@
" Matching "if 1" at the start.
endif
+if failed_count > 0
+ " have make report an error
+ cquit
+endif
qall!
diff --git a/src/version.c b/src/version.c
index 1c7ece3..50c1c4c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2056,
+/**/
2055,
/**/
2054,