diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-25 11:58:55 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-25 11:59:52 -0400 |
commit | bf10cdfcc086692e0ce3d478f3cb62c99b114de6 (patch) | |
tree | e79ca4a54e67853df7d6bef72e577ccd4e56a268 | |
parent | 2f023f40b275a904c96d5b287e9e9abe6df1aec7 (diff) | |
download | rneovim-bf10cdfcc086692e0ce3d478f3cb62c99b114de6.tar.gz rneovim-bf10cdfcc086692e0ce3d478f3cb62c99b114de6.tar.bz2 rneovim-bf10cdfcc086692e0ce3d478f3cb62c99b114de6.zip |
vim-patch:8.1.0188: no test for ":cscope add"
Problem: No test for ":cscope add".
Solution: Add a test. (Dominique Pelle, closes vim/vim#3212)
https://github.com/vim/vim/commit/2196bca7377ff245866cc3cee65b0adb48432ac3
-rw-r--r-- | src/nvim/testdir/test_cscope.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cscope.vim b/src/nvim/testdir/test_cscope.vim index 01a9a3f9ad..5aae3d52b5 100644 --- a/src/nvim/testdir/test_cscope.vim +++ b/src/nvim/testdir/test_cscope.vim @@ -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() |