mirror of
https://github.com/neovim/neovim.git
synced 2025-11-04 17:54:30 +00:00
@@ -254,7 +254,30 @@ func Test_cscopeWithCscopeConnections()
|
|||||||
|
|
||||||
" CleanUp
|
" CleanUp
|
||||||
call CscopeSetupOrClean(0)
|
call CscopeSetupOrClean(0)
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Test ":cs add {dir}" (add the {dir}/cscope.out database)
|
||||||
|
func Test_cscope_add_dir()
|
||||||
|
call mkdir('Xcscopedir', 'p')
|
||||||
|
|
||||||
|
" Cscope doesn't handle symlinks, so this needs to be resolved in case a
|
||||||
|
" shadow directory is being used.
|
||||||
|
let memfile = resolve('./samples/memfile_test.c')
|
||||||
|
call system('cscope -bk -fXcscopedir/cscope.out ' . memfile)
|
||||||
|
|
||||||
|
cs add Xcscopedir
|
||||||
|
let a = execute('cscope show')
|
||||||
|
let lines = split(a, "\n", 1)
|
||||||
|
call assert_equal(3, len(lines))
|
||||||
|
call assert_equal(' # pid database name prepend path', lines[0])
|
||||||
|
call assert_equal('', lines[1])
|
||||||
|
call assert_match('^ 0 \d\+.*Xcscopedir/cscope.out\s\+<none>$', lines[2])
|
||||||
|
|
||||||
|
cs kill -1
|
||||||
|
call delete('Xcscopedir/cscope.out')
|
||||||
|
call assert_fails('cs add Xcscopedir', 'E563:')
|
||||||
|
|
||||||
|
call delete('Xcscopedir', 'd')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_cscopequickfix()
|
func Test_cscopequickfix()
|
||||||
|
|||||||
Reference in New Issue
Block a user