From c5db02d79276a06854907805d011aa2605a0b14b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 31 Mar 2019 11:00:14 -0400 Subject: vim-patch:8.1.1073: space in number column is on wrong side with 'rightleft' set Problem: Space in number column is on wrong side with 'rightleft' set. Solution: Move the space to the text side. Add a test. https://github.com/vim/vim/commit/e73f911c53de1c87e39456ba20782f72a0ca8f4f --- src/nvim/testdir/test_diffmode.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index b2e75265a6..00f4563f3d 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -763,6 +763,9 @@ func Test_diff_of_diff() call VerifyScreenDump(buf, 'Test_diff_of_diff_01', {}) + call term_sendkeys(buf, ":set rightleft\") + call VerifyScreenDump(buf, 'Test_diff_of_diff_02', {}) + " clean up call StopVimInTerminal(buf) call delete('Xtest_diff_diff') -- cgit From be762a1b6f63c574b1090e4aad9044fb41533330 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 31 Mar 2019 11:10:03 -0400 Subject: vim-patch:8.1.1074: Python test doesn't wipe out hidden buffer Problem: Python test doesn't wipe out hidden buffer. Solution: Wipe out the buffer. (Ben Jackson, closes vim/vim#4189) https://github.com/vim/vim/commit/bfd36036700ab2d4c9de48e37f222f4a4dd7b3b0 --- src/nvim/testdir/test_python2.vim | 13 +++++++++---- src/nvim/testdir/test_python3.vim | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_python2.vim b/src/nvim/testdir/test_python2.vim index 448785db6d..0c5809f7a4 100644 --- a/src/nvim/testdir/test_python2.vim +++ b/src/nvim/testdir/test_python2.vim @@ -70,32 +70,37 @@ func _SetUpHiddenBuffer() call assert_equal( line( '.' ), 11 ) endfunc +func _CleanUpHiddenBuffer() + bwipe! hidden + bwipe! +endfunc + func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear() call _SetUpHiddenBuffer() py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List() call _SetUpHiddenBuffer() py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ] call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str() call _SetUpHiddenBuffer() py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test' call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine() call _SetUpHiddenBuffer() py vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func _SetUpVisibleBuffer() diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index d5b1cb1b34..d090dcc99c 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -70,32 +70,37 @@ func _SetUpHiddenBuffer() call assert_equal( line( '.' ), 11 ) endfunc +func _CleanUpHiddenBuffer() + bwipe! hidden + bwipe! +endfunc + func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Clear() call _SetUpHiddenBuffer() py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = None call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_List() call _SetUpHiddenBuffer() py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][:] = [ 'test' ] call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_Str() call _SetUpHiddenBuffer() py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = 'test' call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func Test_Write_To_HiddenBuffer_Does_Not_Fix_Cursor_ClearLine() call _SetUpHiddenBuffer() py3 vim.buffers[ int( vim.eval( 'bufnr("hidden")' ) ) ][0] = None call assert_equal( line( '.' ), 11 ) - bwipe! + call _CleanUpHiddenBuffer() endfunc func _SetUpVisibleBuffer() -- cgit From 13f4d4fb6e10ca59a93b1e7ebb56215891b80c2e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 31 Mar 2019 12:55:45 -0400 Subject: vim-patch:8.1.1087: tag stack is incorrect after CTRL-T and then :tag Problem: tag stack is incorrect after CTRL-T and then :tag Solution: Handle DT_TAG differently. (test by Andy Massimino, closes vim/vim#3944, closes vim/vim#4177) https://github.com/vim/vim/commit/7559dcef6cfd0ba13271088fff51b8979fee950b --- src/nvim/testdir/test_tagjump.vim | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim index f9bd8b5246..180738a7c9 100644 --- a/src/nvim/testdir/test_tagjump.vim +++ b/src/nvim/testdir/test_tagjump.vim @@ -258,4 +258,77 @@ func Test_tagjump_etags() bwipe! endfunc +func Test_tag_with_count() + call writefile([ + \ 'test Xtest.h /^void test();$/;" p typeref:typename:void signature:()', + \ ], 'Xtags') + call writefile([ + \ 'main Xtest.c /^int main()$/;" f typeref:typename:int signature:()', + \ 'test Xtest.c /^void test()$/;" f typeref:typename:void signature:()', + \ ], 'Ytags') + cal writefile([ + \ 'int main()', + \ 'void test()', + \ ], 'Xtest.c') + cal writefile([ + \ 'void test();', + \ ], 'Xtest.h') + set tags=Xtags,Ytags + + new Xtest.c + let tl = taglist('test', 'Xtest.c') + call assert_equal(tl[0].filename, 'Xtest.c') + call assert_equal(tl[1].filename, 'Xtest.h') + + tag test + call assert_equal(bufname('%'), 'Xtest.c') + 1tag test + call assert_equal(bufname('%'), 'Xtest.c') + 2tag test + call assert_equal(bufname('%'), 'Xtest.h') + + set tags& + call delete('Xtags') + call delete('Ytags') + bwipe Xtest.h + bwipe Xtest.c + call delete('Xtest.h') + call delete('Xtest.c') +endfunc + +func Test_tagnr_recall() + call writefile([ + \ 'test Xtest.h /^void test();$/;" p', + \ 'main Xtest.c /^int main()$/;" f', + \ 'test Xtest.c /^void test()$/;" f', + \ ], 'Xtags') + cal writefile([ + \ 'int main()', + \ 'void test()', + \ ], 'Xtest.c') + cal writefile([ + \ 'void test();', + \ ], 'Xtest.h') + set tags=Xtags + + new Xtest.c + let tl = taglist('test', 'Xtest.c') + call assert_equal(tl[0].filename, 'Xtest.c') + call assert_equal(tl[1].filename, 'Xtest.h') + + 2tag test + call assert_equal(bufname('%'), 'Xtest.h') + pop + call assert_equal(bufname('%'), 'Xtest.c') + tag + call assert_equal(bufname('%'), 'Xtest.h') + + set tag& + call delete('Xtags') + bwipe Xtest.h + bwipe Xtest.c + call delete('Xtest.h') + call delete('Xtest.c') +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit