aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-09-18 22:52:22 +0200
committerDaniel Hahler <git@thequod.de>2019-09-18 22:59:13 +0200
commit660b452440d60725f0cd68f264ba10b6add068c8 (patch)
tree090ca0d2ba8904f2a6a698af0d75bcf3b1a2bdb7
parent0e75a9eead33b99d8bbf30ec2b67f09257bf71ee (diff)
downloadrneovim-660b452440d60725f0cd68f264ba10b6add068c8.tar.gz
rneovim-660b452440d60725f0cd68f264ba10b6add068c8.tar.bz2
rneovim-660b452440d60725f0cd68f264ba10b6add068c8.zip
vim-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 vim/vim#4949) https://github.com/vim/vim/commit/cd67059c0c3abf1e28aa66458abdf6f338252eb2
-rw-r--r--.gitignore1
-rw-r--r--runtime/indent/testdir/runtest.vim6
2 files changed, 7 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 7db3d96e2b..b7f710d1d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,7 @@ tags
/src/nvim/testdir/valgrind.*
/src/nvim/testdir/.gdbinit
/runtime/indent/testdir/*.out
++runtime/indent/testdir/*.fail
# Generated by src/nvim/testdir/runnvim.sh.
/src/nvim/testdir/*.tlog
diff --git a/runtime/indent/testdir/runtest.vim b/runtime/indent/testdir/runtest.vim
index 0f0051415d..9502c42f3e 100644
--- 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!