Improve tests
This commit is contained in:
parent
13f92e7d9b
commit
132b284dcd
6 changed files with 17 additions and 12 deletions
|
|
@ -205,11 +205,11 @@ class DebugSession( object ):
|
|||
|
||||
def _Reset( self ):
|
||||
if self._uiTab:
|
||||
vim.current.tabpage = self._uiTab
|
||||
self._stackTraceView.Reset()
|
||||
self._variablesView.Reset()
|
||||
self._outputView.Reset()
|
||||
self._codeView.Reset()
|
||||
vim.current.tabpage = self._uiTab
|
||||
vim.command( 'tabclose!' )
|
||||
self._uiTab = None
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
RUN_VIM="vim --noplugin --clean --not-a-term"
|
||||
RUN_VIM="vim --clean --not-a-term"
|
||||
RUN_TEST="${RUN_VIM} -S run_test.vim"
|
||||
|
||||
if [ -z "$VIMSPECTOR_MIMODE" ]; then
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
RUN_VIM="vim --noplugin --clean --not-a-term -Nu vimrc"
|
||||
RUN_TEST="${RUN_VIM} -S run_test.vim"
|
||||
|
||||
pushd tests > /dev/null
|
||||
|
||||
exec $RUN_VIM "$@"
|
||||
exec vim \
|
||||
--clean \
|
||||
--not-a-term \
|
||||
--cmd "let g:vimspector_enable_mappings='HUMAN'" \
|
||||
-Nu $(dirname $0)/../../tests/vimrc \
|
||||
"$@"
|
||||
|
|
|
|||
|
|
@ -156,6 +156,10 @@ function! Test_Use_Mappings_HUMAN()
|
|||
" Here we go. Start Debugging
|
||||
call feedkeys( "\<F5>", 'xt' )
|
||||
|
||||
call assert_equal( 2, len( gettabinfo() ) )
|
||||
let cur_tabnr = tabpagenr()
|
||||
call assert_equal( 5, len( gettabinfo( cur_tabnr )[ 0 ].windows ) )
|
||||
|
||||
call vimspector#Reset()
|
||||
|
||||
call vimspector#ClearBreakpoints()
|
||||
|
|
@ -166,7 +170,6 @@ function! Test_Use_Mappings_HUMAN()
|
|||
call assert_equal( 1, len( signs ), 1 )
|
||||
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
||||
|
||||
|
||||
lcd -
|
||||
%bwipeout!
|
||||
endfunction
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ func RunTheTest(test)
|
|||
else
|
||||
try
|
||||
let s:test = a:test
|
||||
let s:testid = g:testpath . ':' . a:test
|
||||
au VimLeavePre * call EarlyExit(s:test)
|
||||
exe 'call ' . a:test
|
||||
au! VimLeavePre
|
||||
|
|
@ -197,7 +198,7 @@ endfunc
|
|||
func AfterTheTest()
|
||||
if len(v:errors) > 0
|
||||
let s:fail += 1
|
||||
call add(s:errors, 'Found errors in ' . s:test . ':')
|
||||
call add(s:errors, 'Found errors in ' . s:testid . ':')
|
||||
call extend(s:errors, v:errors)
|
||||
let v:errors = []
|
||||
endif
|
||||
|
|
@ -318,7 +319,7 @@ for s:test in sort(s:tests)
|
|||
\ && (index(s:flaky_tests, s:test) >= 0
|
||||
\ || v:errors[0] =~ s:flaky_errors_re)
|
||||
while 1
|
||||
call add(s:messages, 'Found errors in ' . s:test . ':')
|
||||
call add(s:messages, 'Found errors in ' . s:testid . ':')
|
||||
call extend(s:messages, v:errors)
|
||||
|
||||
call add(total_errors, 'Run ' . run_nr . ':')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
let g:vimspector_test_plugin_path = expand( '<sfile>:h:h' )
|
||||
let g:vimspector_test_plugin_path = expand( '<sfile>:p:h:h' )
|
||||
set mouse=a
|
||||
|
||||
let &rtp = &rtp . ',' . g:vimspector_test_plugin_path
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue