Add way to run tests using my in-development vim debugger

This commit is contained in:
Ben Jackson 2020-04-26 13:05:24 +01:00
commit 77522cbd44
2 changed files with 23 additions and 2 deletions

21
tests/.vimspector.json Normal file
View file

@ -0,0 +1,21 @@
{
"configurations": {
"Run test": {
"adapter": "vim-debug-adapter",
"configuration": {
"request": "launch",
"cwd": "${workspaceRoot}",
"env": {
"VIMSPECTOR_MIMODE": "lldb"
},
"args": [
"--clean",
"--not-a-term",
"-S", "lib/run_test.vim",
"${file}",
"${TestFunction}"
]
}
}
}
}

View file

@ -36,7 +36,7 @@
let s:single_test_timeout = 60000
" Restrict the runtimepath to the exact minimum needed for testing
let &rtp = getcwd() . '/lib'
let &runtimepath = getcwd() . '/lib'
set runtimepath+=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
if has('packages')
let &packpath = &runtimepath
@ -71,7 +71,7 @@ func s:TestFailed()
endfunc
func! Abort( timer_id )
if exists( '&debugfunc' ) && &debugfunc != ''
if exists( '&debugfunc' ) && &debugfunc !=# ''
return
endif