Last active
April 22, 2016 18:33
-
-
Save ih4cku/fa5d57f9f1dc5c03b6c36155bf3e2904 to your computer and use it in GitHub Desktop.
run test if make success
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap <F7> :make! test<CR> | |
augroup MakeRunTestGroup | |
autocmd! | |
autocmd QuickFixCmdPost make call RunTest() | |
augroup END | |
function! RunTest() | |
" check quickfix list | |
let l:b_ok = 1 | |
for m in getqflist() | |
if m['valid']==1 | |
let l:b_ok = 0 | |
break | |
endif | |
endfor | |
if l:b_ok == 1 | |
!build/test.bin | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment