forked from aniani/vim
patch 8.2.4538: the find_tags_in_file() function is too long
Problem: The find_tags_in_file() function is too long. Solution: Refactor into smaller functions. (Yegappan Lakshmanan, closes #9920)
This commit is contained in:
parent
48f83c31d1
commit
bf40e90dfe
@ -811,11 +811,11 @@ endfunc
|
||||
|
||||
" Test for an unsorted tags file
|
||||
func Test_tag_sort()
|
||||
call writefile([
|
||||
let l = [
|
||||
\ "first\tXfoo\t1",
|
||||
\ "ten\tXfoo\t3",
|
||||
\ "six\tXfoo\t2"],
|
||||
\ 'Xtags')
|
||||
\ "six\tXfoo\t2"]
|
||||
call writefile(l, 'Xtags')
|
||||
set tags=Xtags
|
||||
let code =<< trim [CODE]
|
||||
int first() {}
|
||||
@ -826,7 +826,14 @@ func Test_tag_sort()
|
||||
|
||||
call assert_fails('tag first', 'E432:')
|
||||
|
||||
" When multiple tag files are not sorted, then message should be displayed
|
||||
" multiple times
|
||||
call writefile(l, 'Xtags2')
|
||||
set tags=Xtags,Xtags2
|
||||
call assert_fails('tag first', ['E432:', 'E432:'])
|
||||
|
||||
call delete('Xtags')
|
||||
call delete('Xtags2')
|
||||
call delete('Xfoo')
|
||||
set tags&
|
||||
%bwipe
|
||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4538,
|
||||
/**/
|
||||
4537,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user