From b2345ddbf33ab4941839ac0976a9e8261b284c40 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 18 Nov 2022 17:37:33 +0800 Subject: vim-patch:8.2.4543: Coverity warning for refactored tag search code Problem: Coverity warning for refactored tag search code. Solution: Avoid the warnings. Update comments. Add one more test case. (Yegappan Lakshmanan, closes vim/vim#9928) https://github.com/vim/vim/commit/20fb28b1dcc092787e1a7b22dcfcfe1e46e29813 Co-authored-by: Yegappan Lakshmanan --- src/nvim/testdir/test_tagjump.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index c981bfc26c..be60a3535c 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -1598,6 +1598,15 @@ func Test_tagbsearch() call assert_equal(3, line('.')) %bw! + " Binary search fails on EOF + call writefile([ + \ "!_TAG_FILE_ENCODING\tutf-8\t//", + \ "!_TAG_FILE_SORTED\t1\t/0=unsorted, 1=sorted, 2=foldcase/", + \ "bar\tXfoo\t1", + \ "foo\tXfoo\t2"], + \ 'Xtags') + call assert_fails('tag bbb', 'E426:') + call delete('Xtags') call delete('Xfoo') set tags& tagbsearch& -- cgit