Skip to content

Commit

Permalink
patch 8.1.0188: no test for ":cscope add"
Browse files Browse the repository at this point in the history
Problem:    No test for ":cscope add".
Solution:   Add a test. (Dominique Pelle, closes #3212)
  • Loading branch information
brammool committed Jul 15, 2018
1 parent 7132ddc commit 2196bca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/testdir/test_cscope.vim
Expand Up @@ -254,7 +254,25 @@ func Test_cscopeWithCscopeConnections()

" CleanUp
call CscopeSetupOrClean(0)
endfunc

" Test ":cs add {dir}" (add the {dir}/cscope.out database)
func Test_cscope_add_dir()
call mkdir('Xcscopedir', 'p')
call system('cscope -bk -fXcscopedir/cscope.out ../memfile_test.c')
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

func Test_cscopequickfix()
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -789,6 +789,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
188,
/**/
187,
/**/
Expand Down

0 comments on commit 2196bca

Please sign in to comment.