Common setup/cleardown
This commit is contained in:
parent
14abf30518
commit
9fcfa13cc1
3 changed files with 26 additions and 19 deletions
|
|
@ -1,18 +1,9 @@
|
|||
function! SetUp()
|
||||
if exists ( 'g:loaded_vimpector' )
|
||||
unlet g:loaded_vimpector
|
||||
endif
|
||||
|
||||
source vimrc
|
||||
|
||||
" This is a bit of a hack
|
||||
runtime! plugin/**/*.vim
|
||||
call vimspector#test#setup#SetUpWithMappings( v:none )
|
||||
endfunction
|
||||
|
||||
function! ClearDown()
|
||||
if exists( '*vimspector#internal#state#Reset' )
|
||||
call vimspector#internal#state#Reset()
|
||||
endif
|
||||
call vimspector#test#setup#ClearDown()
|
||||
endfunction
|
||||
|
||||
function! SetUp_Test_Mappings_Are_Added_HUMAN()
|
||||
|
|
|
|||
20
tests/lib/autoload/vimspector/test/setup.vim
Normal file
20
tests/lib/autoload/vimspector/test/setup.vim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
function! vimspector#test#setup#SetUpWithMappings( mappings )
|
||||
if exists ( 'g:loaded_vimpector' )
|
||||
unlet g:loaded_vimpector
|
||||
endif
|
||||
|
||||
if a:mappings != v:none
|
||||
let g:vimspector_enable_mappings = a:mappings
|
||||
endif
|
||||
|
||||
source vimrc
|
||||
|
||||
" This is a bit of a hack
|
||||
runtime! plugin/**/*.vim
|
||||
endfunction
|
||||
|
||||
function! vimspector#test#setup#ClearDown()
|
||||
if exists( '*vimspector#internal#state#Reset' )
|
||||
call vimspector#internal#state#Reset()
|
||||
endif
|
||||
endfunction
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
function! SetUp()
|
||||
if exists ( 'g:loaded_vimpector' )
|
||||
unlet g:loaded_vimpector
|
||||
endif
|
||||
call vimspector#test#setup#SetUpWithMappings( 'HUMAN' )
|
||||
endfunction
|
||||
|
||||
let g:vimspector_enable_mappings = 'HUMAN'
|
||||
source vimrc
|
||||
|
||||
" This is a bit of a hack
|
||||
runtime! plugin/**/*.vim
|
||||
function! ClearDown()
|
||||
call vimspector#test#setup#ClearDown()
|
||||
endfunction
|
||||
|
||||
function! Test_Step_With_Different_Tabpage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue