diff runtime/indent/testdir/runtest.vim @ 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 bd7461db24b3
children a0e0f0256d0b
line wrap: on
line diff
--- 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!