diff options
| author | Marco Hinz <mh.codebro@gmail.com> | 2019-04-01 01:50:01 +0200 |
|---|---|---|
| committer | Marco Hinz <mh.codebro@gmail.com> | 2019-04-02 22:20:53 +0200 |
| commit | e05a47f68b84fb4318959d9563f865f63ef5fa4d (patch) | |
| tree | aa401895d141e470934c16232c019cd10c45254e /src/nvim/testdir | |
| parent | 2a73549ee8633afa817cc49fd691dc0ed3e67cf4 (diff) | |
| download | rneovim-e05a47f68b84fb4318959d9563f865f63ef5fa4d.tar.gz rneovim-e05a47f68b84fb4318959d9563f865f63ef5fa4d.tar.bz2 rneovim-e05a47f68b84fb4318959d9563f865f63ef5fa4d.zip | |
vim-patch:8.1.1094: long line in tags file causes error
Problem: Long line in tags file causes error.
Solution: Check for overlong line earlier. (Andy Massimino)
https://github.com/vim/vim/commit/5209334c551778fe6f76945f373ee14fcac96f52
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_tagjump.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index 180738a7c9..ad1f5fab73 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -331,4 +331,35 @@ func Test_tagnr_recall() call delete('Xtest.c') endfunc +func Test_tag_line_toolong() + call writefile([ + \ '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 django/contrib/admin/templates/admin/edit_inline/stacked.html 16;" j line:16 language:HTML' + \ ], 'Xtags') + set tags=Xtags + let old_vbs = &verbose + set verbose=5 + " ":tjump" should give "tag not found" not "Format error in tags file" + call assert_fails('tj /foo', 'E426') + try + tj /foo + catch /^Vim\%((\a\+)\)\=:E431/ + call assert_report(v:exception) + catch /.*/ + endtry + call assert_equal('Ignoring long line in tags file', split(execute('messages'), '\n')[-1]) + call writefile([ + \ '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 django/contrib/admin/templates/admin/edit_inline/stacked.html 16;" j line:16 language:HTML' + \ ], 'Xtags') + call assert_fails('tj /foo', 'E426') + try + tj /foo + catch /^Vim\%((\a\+)\)\=:E431/ + call assert_report(v:exception) + catch /.*/ + endtry + call assert_equal('Ignoring long line in tags file', split(execute('messages'), '\n')[-1]) + call delete('Xtags') + let &verbose = old_vbs +endfunc + " vim: shiftwidth=2 sts=2 expandtab |