diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-20 20:20:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-20 20:20:35 +0100 |
| commit | df1e7b7edaf6c2ab9435d3734488c74a278f64a1 (patch) | |
| tree | 223e5aa94265f7ebd64e53411642e85a14acc1d4 /src/nvim/testdir | |
| parent | ae16e4fa1363b531972628c14bb225b4cd45dbc6 (diff) | |
| parent | a56615214dbbc4b2f9cf38f65f95172a2ef06289 (diff) | |
| download | rneovim-df1e7b7edaf6c2ab9435d3734488c74a278f64a1.tar.gz rneovim-df1e7b7edaf6c2ab9435d3734488c74a278f64a1.tar.bz2 rneovim-df1e7b7edaf6c2ab9435d3734488c74a278f64a1.zip | |
Merge #6320 from jamessan/vim-8.0.0116
vim-patch:8.0.0116,8.0.0190,8.0.0195,8.0.0190,8.0.0223,8.0.0393
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_help_tagjump.vim | 32 | ||||
| -rw-r--r-- | src/nvim/testdir/test_tagjump.vim | 42 |
2 files changed, 74 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_help_tagjump.vim b/src/nvim/testdir/test_help_tagjump.vim index aabfe40537..1ca0f722cf 100644 --- a/src/nvim/testdir/test_help_tagjump.vim +++ b/src/nvim/testdir/test_help_tagjump.vim @@ -162,4 +162,36 @@ func Test_help_complete() endtry endfunc +func Test_help_respect_current_file_lang() + try + let list = [] + call s:doc_config_setup() + + if has('multi_lang') + function s:check_help_file_ext(help_keyword, ext) + exec 'help ' . a:help_keyword + call assert_equal(a:ext, expand('%:e')) + call feedkeys("\<C-]>", 'tx') + call assert_equal(a:ext, expand('%:e')) + pop + helpclose + endfunc + + set rtp+=Xdir1/doc-ab + set rtp+=Xdir1/doc-ja + + set helplang=ab + call s:check_help_file_ext('test-char', 'abx') + call s:check_help_file_ext('test-char@ja', 'jax') + set helplang=ab,ja + call s:check_help_file_ext('test-char@ja', 'jax') + call s:check_help_file_ext('test-char@en', 'txt') + endif + catch + call assert_exception('X') + finally + call s:doc_config_teardown() + endtry +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index 678ad0ada8..2044c23f79 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -23,4 +23,46 @@ func Test_cancel_ptjump() quit endfunc +func Test_static_tagjump() + set tags=Xtags + call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", + \ "one\tXfile1\t/^one/;\"\tf\tfile:\tsignature:(void)", + \ "word\tXfile2\tcmd2"], + \ 'Xtags') + new Xfile1 + call setline(1, ['empty', 'one()', 'empty']) + write + tag one + call assert_equal(2, line('.')) + + bwipe! + set tags& + call delete('Xtags') + call delete('Xfile1') +endfunc + +func Test_duplicate_tagjump() + set tags=Xtags + call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", + \ "thesame\tXfile1\t1;\"\td\tfile:", + \ "thesame\tXfile1\t2;\"\td\tfile:", + \ "thesame\tXfile1\t3;\"\td\tfile:", + \ ], + \ 'Xtags') + new Xfile1 + call setline(1, ['thesame one', 'thesame two', 'thesame three']) + write + tag thesame + call assert_equal(1, line('.')) + tnext + call assert_equal(2, line('.')) + tnext + call assert_equal(3, line('.')) + + bwipe! + set tags& + call delete('Xtags') + call delete('Xfile1') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |