Print failure when watch expression errors
This commit is contained in:
parent
8e2d352eb8
commit
2eac9ddff8
2 changed files with 56 additions and 5 deletions
|
|
@ -557,3 +557,37 @@ function Test_EvaluatePromptConsole()
|
|||
call vimspector#test#setup#Reset()
|
||||
%bwipe!
|
||||
endfunction
|
||||
|
||||
function! Test_EvaluateFailure()
|
||||
call s:StartDebugging()
|
||||
|
||||
" Add a wtch
|
||||
call vimspector#AddWatch( 'test' )
|
||||
call WaitForAssert( {->
|
||||
\ AssertMatchist(
|
||||
\ [
|
||||
\ 'Watches: ----',
|
||||
\ 'Expression: test',
|
||||
\ " *- Result: NameError: name 'test' is not defined",
|
||||
\ ],
|
||||
\ getbufline( winbufnr( g:vimspector_session_windows.watches ),
|
||||
\ 1,
|
||||
\ '$' )
|
||||
\ )
|
||||
\ } )
|
||||
|
||||
VimspectorEval test
|
||||
call assert_equal( bufnr( 'vimspector.Console' ),
|
||||
\ winbufnr( g:vimspector_session_windows.output ) )
|
||||
call WaitForAssert( {->
|
||||
\ assert_equal(
|
||||
\ [
|
||||
\ "NameError: name 'test' is not defined"
|
||||
\ ],
|
||||
\ getbufline( bufnr( 'vimspector.Console' ), '$', '$' )
|
||||
\ )
|
||||
\ } )
|
||||
|
||||
call vimspector#test#setup#Reset()
|
||||
%bwipe!
|
||||
endfunction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue