changeset 18122:0cc306ebc8fe v8.1.2056

patch 8.1.2056: "make test" for indent files doesn't cause make to fail Commit: https://github.com/vim/vim/commit/cd67059c0c3abf1e28aa66458abdf6f338252eb2 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 18 22:14:43 2019 +0200 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 https://github.com/vim/vim/issues/4949)
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 Sep 2019 22:15:04 +0200
parents a505da83c907
children ceb4be0b23c7
files .gitignore runtime/indent/testdir/runtest.vim src/version.c
diffstat 3 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.gitignore
+++ b/.gitignore
@@ -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
--- a/runtime/indent/testdir/runtest.vim
+++ b/runtime/indent/testdir/runtest.vim
@@ -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!
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2056,
+/**/
     2055,
 /**/
     2054,