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.
b0f94c1ff3

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.
b46fecd345

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
This commit is contained in:
zeertzjq
2022-07-08 08:26:25 +08:00
committed by GitHub
parent 72877bb17d
commit ca64b589cd
26 changed files with 87 additions and 73 deletions

View File

@@ -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("\<LeftMouse>", "xt")
call assert_equal([0, 1, 5, 0], getpos('.'))
call test_setmouse(2, 20)
call feedkeys("\<LeftMouse>", "xt")
call assert_equal([0, 2, 8, 0], getpos('.'))
call test_setmouse(5, 1)
call feedkeys("\<LeftMouse>", "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.