Stabilise some tests

This commit is contained in:
Ben Jackson 2020-05-08 11:50:38 +01:00
commit abd8ba7d38
5 changed files with 28 additions and 4 deletions

View file

@ -20,10 +20,26 @@ set cpoptions&vim
" }}}
function! s:_OnServerData( channel, data ) abort
if py3eval( '_vimspector_session is None' )
call ch_log( 'Unexpected stdout data received on channel '
\ . a:channel
\ . 'after reset: '
\ . a:data )
return
endif
py3 _vimspector_session.OnChannelData( vim.eval( 'a:data' ) )
endfunction
function! s:_OnServerError( channel, data ) abort
if py3eval( '_vimspector_session is None' )
call ch_log( 'Unexpected stderr data received on channel '
\ . a:channel
\ . 'after reset: '
\ . a:data )
return
endif
py3 _vimspector_session.OnServerStderr( vim.eval( 'a:data' ) )
endfunction
@ -43,7 +59,7 @@ endfunction
function! vimspector#internal#job#StartDebugSession( config ) abort
if exists( 's:job' )
echom 'Not starging: Job is already running'
echom 'Not starting: Job is already running'
redraw
return v:false
endif

View file

@ -72,6 +72,7 @@ function! Test_Signs_Placed_Using_API_Are_Shown()
call vimspector#test#signs#AssertSignGroupEmpty( 'VimspectorBP' )
call vimspector#test#signs#AssertSignGroupEmpty( 'VimspectorCode' )
call vimspector#test#setup#Reset()
%bwipeout!
endfunction
@ -244,6 +245,7 @@ function Test_DisableBreakpointWhileDebugging()
call vimspector#test#signs#AssertSignGroupEmpty( 'VimspectorCode' )
lcd -
call vimspector#test#setup#Reset()
%bwipeout!
endfunction

View file

@ -27,7 +27,7 @@ RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \
## cleanup of files from setup
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG VIM_VERSION=v8.2.0460
ARG VIM_VERSION=v8.2.0716
ENV CONF_ARGS "--with-features=huge \
--enable-python3interp \

View file

@ -17,11 +17,14 @@ function! vimspector#test#setup#ClearDown() abort
endfunction
function! vimspector#test#setup#WaitForReset() abort
call WaitForAssert( {-> assert_equal( 1, len( gettabinfo() ) ) } )
call WaitForAssert( {->
\ assert_true( pyxeval( '_vimspector_session._connection is None' ) )
\ assert_true( pyxeval( '_vimspector_session is None or ' .
\ '_vimspector_session._connection is None' ) )
\ } )
call WaitForAssert( {->
\ assert_true( pyxeval( '_vimspector_session._uiTab is None' ) )
\ assert_true( pyxeval( '_vimspector_session is None or ' .
\ '_vimspector_session._uiTab is None' ) )
\ }, 10000 )
call vimspector#test#signs#AssertSignGroupEmpty( 'VimspectorCode' )
@ -37,5 +40,7 @@ function! vimspector#test#setup#Reset() abort
if exists( '*vimspector#internal#state#Reset' )
call vimspector#internal#state#Reset()
endif
call popup_clear()
endfunction

View file

@ -16,5 +16,6 @@ WORKDIR /home/dev
ENV HOME /home/dev
ENV PYTHON_CONFIGURE_OPTS --enable-shared
ENV VIMSPECTOR_MIMODE gdb
ADD --chown=dev:dev .vim/ /home/dev/.vim/