Patch 8.2.2884
Problem: Not enough cscope code is covered by tests.
Solution: Add a few test cases. (Dominique Pellé, closes #8246)
Files: src/testdir/test_cscope.vim
*** ../vim-8.2.2883/src/testdir/test_cscope.vim 2020-09-04 21:18:40.480161935
+0200
--- src/testdir/test_cscope.vim 2021-05-24 19:31:08.550709092 +0200
***************
*** 119,124 ****
--- 119,125 ----
endfor
" Test: Invalid find command
+ call assert_fails('cs find', 'E560:')
call assert_fails('cs find x', 'E560:')
if has('float')
***************
*** 180,191 ****
let a = execute('cstag TEST_COUNT')
call assert_match('(1 of 1): <<TEST_COUNT>> #define TEST_COUNT 50000', a)
call assert_equal('#define TEST_COUNT 50000', getline('.'))
set csto=1
let a = execute('cstag index_to_key')
call assert_match('(1 of 1): <<index_to_key>> #define index_to_key(i)
((i) ^ 15167)', a)
call assert_equal('#define index_to_key(i) ((i) ^ 15167)', getline('.'))
! call assert_fails('cstag xxx', 'E257:')
call assert_fails('cstag', 'E562:')
" Test: 'cst' option
set nocst
--- 181,199 ----
let a = execute('cstag TEST_COUNT')
call assert_match('(1 of 1): <<TEST_COUNT>> #define TEST_COUNT 50000', a)
call assert_equal('#define TEST_COUNT 50000', getline('.'))
+ call assert_fails('cstag DOES_NOT_EXIST', 'E257:')
set csto=1
let a = execute('cstag index_to_key')
call assert_match('(1 of 1): <<index_to_key>> #define index_to_key(i)
((i) ^ 15167)', a)
call assert_equal('#define index_to_key(i) ((i) ^ 15167)', getline('.'))
! call assert_fails('cstag DOES_NOT_EXIST', 'E257:')
call assert_fails('cstag', 'E562:')
+ let save_tags = &tags
+ set tags=
+ call assert_fails('cstag DOES_NOT_EXIST', 'E257:')
+ let a = execute('cstag index_to_key')
+ call assert_match('(1 of 1): <<index_to_key>> #define index_to_key(i)
((i) ^ 15167)', a)
+ let &tags = save_tags
" Test: 'cst' option
set nocst
***************
*** 209,220 ****
--- 217,232 ----
cd ..
call delete('Xcscoperelative', 'd')
+ " Test: E259: no match found
+ call assert_fails('cscope find g DOES_NOT_EXIST', 'E259:')
+
" Test: this should trigger call to cs_print_tags()
" Unclear how to check result though, we just exercise the code.
set cst cscopequickfix=s0
call feedkeys(":cs find s main\<CR>", 't')
" Test: cscope kill
+ call assert_fails('cscope kill', 'E560:')
call assert_fails('cscope kill 2', 'E261:')
call assert_fails('cscope kill xxx', 'E261:')
*** ../vim-8.2.2883/src/version.c 2021-05-24 18:48:00.756582853 +0200
--- src/version.c 2021-05-24 19:29:41.398907084 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2884,
/**/
--
DENNIS: Listen -- strange women lying in ponds distributing swords is no
basis for a system of government. Supreme executive power derives
from a mandate from the masses, not from some farcical aquatic
ceremony.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202105241738.14OHc2h5255932%40masaka.moolenaar.net.