Make reset reliable by waiting for it to finish
This commit is contained in:
parent
942e04ef4d
commit
34df47fe35
2 changed files with 21 additions and 13 deletions
|
|
@ -154,7 +154,10 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
normal 0
|
normal 0
|
||||||
call AssertCursorIsAtLineInBuffer( 'simple.cpp', 15, 1 )
|
call AssertCursorIsAtLineInBuffer( 'simple.cpp', 15, 1 )
|
||||||
|
|
||||||
" Add the breakpoing
|
call AssertSignGroupEmptyAtLine( 'VimspectorBP',
|
||||||
|
\ 15 )
|
||||||
|
|
||||||
|
" Add the breakpoint
|
||||||
call feedkeys( "\<F9>", 'xt' )
|
call feedkeys( "\<F9>", 'xt' )
|
||||||
call AssertSignGroupSingletonAtLine( 'VimspectorBP',
|
call AssertSignGroupSingletonAtLine( 'VimspectorBP',
|
||||||
\ 15,
|
\ 15,
|
||||||
|
|
@ -191,11 +194,7 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
call AssertCursorIsAtLineInBuffer( 'simple.cpp', 16, 1 )
|
call AssertCursorIsAtLineInBuffer( 'simple.cpp', 16, 1 )
|
||||||
call AssertPCIsAtLineInBuffer( '%', 16 )
|
call AssertPCIsAtLineInBuffer( '%', 16 )
|
||||||
|
|
||||||
call vimspector#Reset()
|
call vimspector#test#setup#Reset()
|
||||||
call AssertSignGroupEmpty( 'VimspectorCode' )
|
|
||||||
|
|
||||||
call vimspector#ClearBreakpoints()
|
|
||||||
call AssertSignGroupEmpty( 'VimspectorBP' )
|
|
||||||
|
|
||||||
lcd -
|
lcd -
|
||||||
%bwipeout!
|
%bwipeout!
|
||||||
|
|
@ -215,11 +214,7 @@ function Test_StopAtEntry()
|
||||||
call AssertCursorIsAtLineInBuffer( 'simple.cpp', 15, 1 )
|
call AssertCursorIsAtLineInBuffer( 'simple.cpp', 15, 1 )
|
||||||
call AssertPCIsAtLineInBuffer( 'simple.cpp', 15 )
|
call AssertPCIsAtLineInBuffer( 'simple.cpp', 15 )
|
||||||
|
|
||||||
call vimspector#Reset()
|
call vimspector#test#setup#Reset()
|
||||||
call AssertSignGroupEmpty( 'VimspectorCode' )
|
|
||||||
|
|
||||||
call vimspector#ClearBreakpoints()
|
|
||||||
call AssertSignGroupEmpty( 'VimspectorBP' )
|
|
||||||
|
|
||||||
lcd -
|
lcd -
|
||||||
%bwipeout!
|
%bwipeout!
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
function! vimspector#test#setup#SetUpWithMappings( mappings )
|
function! vimspector#test#setup#SetUpWithMappings( mappings ) abort
|
||||||
if exists ( 'g:loaded_vimpector' )
|
if exists ( 'g:loaded_vimpector' )
|
||||||
unlet g:loaded_vimpector
|
unlet g:loaded_vimpector
|
||||||
endif
|
endif
|
||||||
|
|
@ -13,8 +13,21 @@ function! vimspector#test#setup#SetUpWithMappings( mappings )
|
||||||
runtime! plugin/**/*.vim
|
runtime! plugin/**/*.vim
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! vimspector#test#setup#ClearDown()
|
function! vimspector#test#setup#ClearDown() abort
|
||||||
if exists( '*vimspector#internal#state#Reset' )
|
if exists( '*vimspector#internal#state#Reset' )
|
||||||
call vimspector#internal#state#Reset()
|
call vimspector#internal#state#Reset()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! vimspector#test#setup#Reset() abort
|
||||||
|
call vimspector#Reset()
|
||||||
|
call AssertSignGroupEmpty( 'VimspectorCode' )
|
||||||
|
|
||||||
|
call vimspector#ClearBreakpoints()
|
||||||
|
call AssertSignGroupEmpty( 'VimspectorBP' )
|
||||||
|
|
||||||
|
call WaitForAssert( {->
|
||||||
|
\ assert_true( pyxeval( '_vimspector_session._connection is None' ) )
|
||||||
|
\ } )
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue