]> granicus.if.org Git - vim/commitdiff
patch 8.1.2056: "make test" for indent files doesn't cause make to fail v8.1.2056
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Sep 2019 20:14:43 +0000 (22:14 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Sep 2019 20:14:43 +0000 (22:14 +0200)
Problem:    "make test" for indent files doesn't cause make to fail.
Solution:   Exit the script with ":cquit". (Daniel Hahler, closes #4949)

.gitignore
runtime/indent/testdir/runtest.vim
src/version.c

index 230401f8ace6b499ddb624e156118421341f6c93..0fd5ba047334c8657b467da0f91631680ef288c4 100644 (file)
@@ -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
index 0f0051415d7cce0d6d9e314a1750cb7a33f5b232..9502c42f3e8287a60eb6b3a1ee8030cbbccb661a 100644 (file)
@@ -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!
index 1c7ece3c859a3ca07ed77e8f92bde158be0d1595..50c1c4cd951e7265105f93d62a8eb2a3efac4914 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2056,
 /**/
     2055,
 /**/