aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-18 16:20:32 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-18 19:41:54 +0800
commit136112a869e6f94f34627a2902eb83c8ee526273 (patch)
treec160f6158e2494cc9203e045a19fa1876ffb22e8 /src/nvim/testdir
parente41469a5b501390e9e8d1ed22ffdb4cf103cf99e (diff)
downloadrneovim-136112a869e6f94f34627a2902eb83c8ee526273.tar.gz
rneovim-136112a869e6f94f34627a2902eb83c8ee526273.tar.bz2
rneovim-136112a869e6f94f34627a2902eb83c8ee526273.zip
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 vim/vim#9920) https://github.com/vim/vim/commit/bf40e90dfeb1d3d0280077e65782beb3fee31c9f Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_tagjump.vim13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim
index 7a1a0132b3..c981bfc26c 100644
--- a/src/nvim/testdir/test_tagjump.vim
+++ b/src/nvim/testdir/test_tagjump.vim
@@ -805,11 +805,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() {}
@@ -820,7 +820,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