Use the same version as the current macvim

This commit is contained in:
Ben Jackson 2019-06-01 15:04:53 +01:00
commit d458d06bc5
12 changed files with 733 additions and 4 deletions

View file

@ -1,3 +1,5 @@
source lib/shared.vim
function! SetUp()
if exists ( 'g:loaded_vimpector' )
unlet g:loaded_vimpector
@ -160,6 +162,63 @@ function! Test_Use_Mappings_HUMAN()
let cur_tabnr = tabpagenr()
call assert_equal( 5, len( gettabinfo( cur_tabnr )[ 0 ].windows ) )
call WaitForAssert( {->
\ assert_equal( 'simple.cpp', bufname( '%' ), 'Current buffer' )
\ } )
call assert_equal( 15, line( '.' ), 'Current line' )
call assert_equal( 1, col( '.' ), 'Current column' )
let signs = sign_getplaced( '%', {
\ 'group': 'VimspectorCode',
\ } )
call assert_equal( 1, len( signs ), 'Sign-buffers' )
call assert_equal( 2, len( signs[ 0 ].signs ), 'Signs in buffer' )
let pc_index = -1
let index = 0
while index < len( signs[ 0 ].signs )
let s = signs[ 0 ].signs[ index ]
if s.name ==# 'vimspectorPC'
if pc_index >= 0
call assert_report( 'Found too many PC signs!' )
endif
let pc_index = index
endif
let index = index + 1
endwhile
call assert_true( pc_index >= 0 )
call assert_equal( 15, signs[ 0 ].signs[ pc_index ].lnum )
" Step
call feedkeys( "\<F10>", 'xt' )
call WaitForAssert( {-> assert_equal( 16, line( '.' ), 'Current line' ) } )
call assert_equal( 'simple.cpp', bufname( '%' ), 'Current buffer' )
call assert_equal( 1, col( '.' ), 'Current column' )
let signs = sign_getplaced( '%', {
\ 'group': 'VimspectorCode',
\ } )
call assert_equal( 1, len( signs ), 'Sign-buffers' )
call assert_equal( 2, len( signs[ 0 ].signs ), 'Signs in buffer' )
let pc_index = -1
let index = 0
while index < len( signs[ 0 ].signs )
let s = signs[ 0 ].signs[ index ]
if s.name ==# 'vimspectorPC'
if pc_index >= 0
call assert_report( 'Found too many PC signs!' )
endif
let pc_index = index
endif
let index = index + 1
endwhile
call assert_true( pc_index >= 0 )
call assert_equal( 16, signs[ 0 ].signs[ pc_index ].lnum )
call vimspector#Reset()
call vimspector#ClearBreakpoints()