better test runner
This commit is contained in:
parent
a5a06857fc
commit
58b14ca461
1 changed files with 33 additions and 26 deletions
|
|
@ -106,18 +106,18 @@ endtry
|
|||
|
||||
set t_Co=256
|
||||
if &term =~ 'xterm-color'
|
||||
set t_ut=
|
||||
set t_ut=
|
||||
endif
|
||||
let g:Powerline_symbols = 'fancy'
|
||||
set nocompatible
|
||||
set laststatus=2
|
||||
|
||||
if v:version >= 703
|
||||
"undo settings
|
||||
set undodir=~/.vim/undofiles
|
||||
set undofile
|
||||
"undo settings
|
||||
set undodir=~/.vim/undofiles
|
||||
set undofile
|
||||
|
||||
set colorcolumn=+1 "mark the ideal max text width
|
||||
set colorcolumn=+1 "mark the ideal max text width
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -156,20 +156,20 @@ autocmd cursorhold,bufwritepost * unlet! b:statusline_trailing_space_warning
|
|||
|
||||
"return '[\s]' if trailing white space is detected return '' otherwise
|
||||
function! StatuslineTrailingSpaceWarning()
|
||||
if !exists("b:statusline_trailing_space_warning")
|
||||
if !exists("b:statusline_trailing_space_warning")
|
||||
|
||||
if !&modifiable
|
||||
let b:statusline_trailing_space_warning = ''
|
||||
return b:statusline_trailing_space_warning
|
||||
endif
|
||||
if !&modifiable
|
||||
let b:statusline_trailing_space_warning = ''
|
||||
return b:statusline_trailing_space_warning
|
||||
endif
|
||||
|
||||
if search('\s\+$', 'nw') != 0
|
||||
let b:statusline_trailing_space_warning = '[\s]'
|
||||
else
|
||||
let b:statusline_trailing_space_warning = ''
|
||||
endif
|
||||
endif
|
||||
return b:statusline_trailing_space_warning
|
||||
if search('\s\+$', 'nw') != 0
|
||||
let b:statusline_trailing_space_warning = '[\s]'
|
||||
else
|
||||
let b:statusline_trailing_space_warning = ''
|
||||
endif
|
||||
endif
|
||||
return b:statusline_trailing_space_warning
|
||||
endfunction
|
||||
|
||||
|
||||
|
|
@ -270,27 +270,34 @@ function! RunTests(filename, test_path)
|
|||
let tmux_pane_target = tmux_pane."_testing:1.0"
|
||||
echo tmux_pane_target
|
||||
|
||||
if a:test_path != ' '
|
||||
let full_test_path = a:filename." ".a:test_path
|
||||
else
|
||||
let full_test_path = a:filename
|
||||
endif
|
||||
|
||||
let command = ""
|
||||
if l:tmux_pane == "checkout"
|
||||
if l:full_test_path != " "
|
||||
" checkout uses py.test (or uh it will)
|
||||
if a:test_path != ' '
|
||||
let full_test_path = a:filename."::".a:test_path
|
||||
else
|
||||
let full_test_path = a:filename
|
||||
endif
|
||||
|
||||
if l:full_test_path != "::"
|
||||
let command = "silent !tmux send-keys -t ".tmux_pane_target." C-c ' tox ".full_test_path." 2>/dev/null' Enter"
|
||||
else
|
||||
let command = "silent !tmux send-keys -t ".tmux_pane_target." C-c ' make test 2>/dev/null' Enter"
|
||||
endif
|
||||
else
|
||||
" yelp-main uses testify
|
||||
if a:test_path != ' '
|
||||
let full_test_path = a:filename." ".a:test_path
|
||||
else
|
||||
let full_test_path = a:filename
|
||||
endif
|
||||
if l:full_test_path != " "
|
||||
let command = "silent !tmux send-keys -t ".tmux_pane_target." C-c ' testify ".full_test_path."' Enter"
|
||||
endif
|
||||
endif
|
||||
echo command
|
||||
echo command
|
||||
exec command
|
||||
exec "redraw!"
|
||||
exec "redraw!"
|
||||
endfun
|
||||
|
||||
function! StoreTestPath(filename, lineno)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue