From ca64b589cd74e9f6bd369286a415711ec7197082 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Jul 2022 08:26:25 +0800 Subject: vim-patch:8.1.{1524,1544}: tests are silently skipped (#19276) This is a port of these two patches combined: vim-patch:8.1.1524: tests are silently skipped Problem: Tests are silently skipped. Solution: Throw an exception for skipped tests in more places. https://github.com/vim/vim/commit/b0f94c1ff34d27d33aa9f96204985ea29c2eb0a1 vim-patch:8.1.1544: some balloon tests don't run when they can Problem: Some balloon tests don't run when they can. Solution: Split GUI balloon tests off into a separate file. (Ozaki Kiichi, closes vim/vim#4538) Change the feature check into a command for consistency. https://github.com/vim/vim/commit/b46fecd3454399f8ebdc5055302e4bfc5a10f98b Omit test_lua.vim: previous patches are N/A Omit test_memory_usage.vim: previous patches are N/A Omit test_textprop.vim: previous patches are N/A Omit test_winbar.vim: previous patches are N/A Omit test_termcodes.vim: mostly N/A Skip Test_mouse_positon() because it uses test_setmouse(). Cannot throw error in a Test_nocatch_ test. Use latest `CheckFeature clipboard_working` for test_quotestar.vim --- src/nvim/testdir/test_assert.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/nvim/testdir/test_assert.vim') diff --git a/src/nvim/testdir/test_assert.vim b/src/nvim/testdir/test_assert.vim index 28c5948142..9d0d5b3e70 100644 --- a/src/nvim/testdir/test_assert.vim +++ b/src/nvim/testdir/test_assert.vim @@ -257,6 +257,26 @@ func Test_assert_with_msg() call remove(v:errors, 0) endfunc +func Test_mouse_position() + throw 'Skipped: Nvim does not have test_setmouse()' + let save_mouse = &mouse + set mouse=a + new + call setline(1, ['line one', 'line two']) + call assert_equal([0, 1, 1, 0], getpos('.')) + call test_setmouse(1, 5) + call feedkeys("\", "xt") + call assert_equal([0, 1, 5, 0], getpos('.')) + call test_setmouse(2, 20) + call feedkeys("\", "xt") + call assert_equal([0, 2, 8, 0], getpos('.')) + call test_setmouse(5, 1) + call feedkeys("\", "xt") + call assert_equal([0, 2, 1, 0], getpos('.')) + bwipe! + let &mouse = save_mouse +endfunc + " Must be last. func Test_zz_quit_detected() " Verify that if a test function ends Vim the test script detects this. -- cgit