Update tests so they actually test and pass
This commit is contained in:
parent
f6e4b6cc5d
commit
13f92e7d9b
1 changed files with 17 additions and 17 deletions
|
|
@ -54,14 +54,14 @@ endfunction
|
||||||
function! Test_Signs_Placed_Using_API_Are_Shown()
|
function! Test_Signs_Placed_Using_API_Are_Shown()
|
||||||
" We need a real file
|
" We need a real file
|
||||||
edit testdata/cpp/simple/simple.cpp
|
edit testdata/cpp/simple/simple.cpp
|
||||||
call feedkeys( "/printf\<CR>", 'x' )
|
call feedkeys( "/printf\<CR>", 'xt' )
|
||||||
|
|
||||||
" Set breakpoint
|
" Set breakpoint
|
||||||
call vimspector#ToggleBreakpoint()
|
call vimspector#ToggleBreakpoint()
|
||||||
|
|
||||||
call assert_true( exists( '*vimspector#ToggleBreakpoint' ) )
|
call assert_true( exists( '*vimspector#ToggleBreakpoint' ) )
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -73,7 +73,7 @@ function! Test_Signs_Placed_Using_API_Are_Shown()
|
||||||
" Disable breakpoint
|
" Disable breakpoint
|
||||||
call vimspector#ToggleBreakpoint()
|
call vimspector#ToggleBreakpoint()
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -85,7 +85,7 @@ function! Test_Signs_Placed_Using_API_Are_Shown()
|
||||||
" Remove breakpoint
|
" Remove breakpoint
|
||||||
call vimspector#ToggleBreakpoint()
|
call vimspector#ToggleBreakpoint()
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -94,7 +94,7 @@ function! Test_Signs_Placed_Using_API_Are_Shown()
|
||||||
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
||||||
|
|
||||||
call vimspector#ClearBreakpoints()
|
call vimspector#ClearBreakpoints()
|
||||||
bwipeout!
|
%bwipeout!
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SetUp_Test_Use_Mappings_HUMAN()
|
function! SetUp_Test_Use_Mappings_HUMAN()
|
||||||
|
|
@ -109,9 +109,9 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
call assert_equal( 15, line( '.' ) )
|
call assert_equal( 15, line( '.' ) )
|
||||||
|
|
||||||
" Add the breakpoing
|
" Add the breakpoing
|
||||||
call feedkeys( "\<F9>", 'x' )
|
call feedkeys( "\<F9>", 'xt' )
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -121,9 +121,9 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
call assert_equal( 'vimspectorBP', signs[ 0 ].signs[ 0 ].name )
|
call assert_equal( 'vimspectorBP', signs[ 0 ].signs[ 0 ].name )
|
||||||
|
|
||||||
" Disable the breakpoint
|
" Disable the breakpoint
|
||||||
call feedkeys( "\<F9>", 'x' )
|
call feedkeys( "\<F9>", 'xt' )
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -132,9 +132,9 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
call assert_equal( 'vimspectorBPDisabled', signs[ 0 ].signs[ 0 ].name )
|
call assert_equal( 'vimspectorBPDisabled', signs[ 0 ].signs[ 0 ].name )
|
||||||
|
|
||||||
" Delete the breakpoint
|
" Delete the breakpoint
|
||||||
call feedkeys( "\<F9>", 'x' )
|
call feedkeys( "\<F9>", 'xt' )
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -142,9 +142,9 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
||||||
|
|
||||||
" Add it again
|
" Add it again
|
||||||
call feedkeys( "\<F9>", 'x' )
|
call feedkeys( "\<F9>", 'xt' )
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP',
|
||||||
\ 'line': line( '.' )
|
\ 'line': line( '.' )
|
||||||
\ } )
|
\ } )
|
||||||
|
|
@ -154,19 +154,19 @@ function! Test_Use_Mappings_HUMAN()
|
||||||
call assert_equal( 'vimspectorBP', signs[ 0 ].signs[ 0 ].name )
|
call assert_equal( 'vimspectorBP', signs[ 0 ].signs[ 0 ].name )
|
||||||
|
|
||||||
" Here we go. Start Debugging
|
" Here we go. Start Debugging
|
||||||
call feedkeys( "\<F5>", 'x' )
|
call feedkeys( "\<F5>", 'xt' )
|
||||||
|
|
||||||
call vimspector#Reset()
|
call vimspector#Reset()
|
||||||
|
|
||||||
call vimspector#ClearBreakpoints()
|
call vimspector#ClearBreakpoints()
|
||||||
|
|
||||||
let signs = sign_getplaced( '.', {
|
let signs = sign_getplaced( '%', {
|
||||||
\ 'group': 'VimspectorBP',
|
\ 'group': 'VimspectorBP'
|
||||||
\ } )
|
\ } )
|
||||||
call assert_equal( 1, len( signs ), 1 )
|
call assert_equal( 1, len( signs ), 1 )
|
||||||
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
call assert_equal( 0, len( signs[ 0 ].signs ) )
|
||||||
|
|
||||||
|
|
||||||
lcd -
|
lcd -
|
||||||
bwipeout!
|
%bwipeout!
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue