mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.5130: edit test for mode message fails when using valgrind (#21118)
Problem: Edit test for mode message fails when using valgrind.
Solution: Use WaitForAssert(). Run beep test later.
c5382b667a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
c011747b5f
commit
0958dccc6d
@ -1863,11 +1863,9 @@ func Test_edit_insertmode_ex_edit()
|
|||||||
call writefile(lines, 'Xtest_edit_insertmode_ex_edit')
|
call writefile(lines, 'Xtest_edit_insertmode_ex_edit')
|
||||||
|
|
||||||
let buf = RunVimInTerminal('-S Xtest_edit_insertmode_ex_edit', #{rows: 6})
|
let buf = RunVimInTerminal('-S Xtest_edit_insertmode_ex_edit', #{rows: 6})
|
||||||
call TermWait(buf, 50)
|
call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, 6))})
|
||||||
call assert_match('^-- INSERT --\s*$', term_getline(buf, 6))
|
|
||||||
call term_sendkeys(buf, "\<C-B>\<C-L>")
|
call term_sendkeys(buf, "\<C-B>\<C-L>")
|
||||||
call TermWait(buf, 50)
|
call WaitForAssert({-> assert_notmatch('^-- INSERT --\s*$', term_getline(buf, 6))})
|
||||||
call assert_notmatch('^-- INSERT --\s*$', term_getline(buf, 6))
|
|
||||||
|
|
||||||
" clean up
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
@ -1875,15 +1873,16 @@ func Test_edit_insertmode_ex_edit()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Pressing escape in 'insertmode' should beep
|
" Pressing escape in 'insertmode' should beep
|
||||||
func Test_edit_insertmode_esc_beeps()
|
" FIXME: Execute this later, when using valgrind it makes the next test
|
||||||
throw "Skipped: Nvim does not support 'insertmode'"
|
" Test_edit_insertmode_ex_edit() fail.
|
||||||
|
func Test_z_edit_insertmode_esc_beeps()
|
||||||
new
|
new
|
||||||
set insertmode
|
" set insertmode
|
||||||
call assert_beeps("call feedkeys(\"one\<Esc>\", 'xt')")
|
" call assert_beeps("call feedkeys(\"one\<Esc>\", 'xt')")
|
||||||
set insertmode&
|
set insertmode&
|
||||||
" unsupported CTRL-G command should beep in insert mode.
|
" unsupported "CTRL-G l" command should beep in insert mode.
|
||||||
call assert_beeps("normal i\<C-G>l")
|
call assert_beeps("normal i\<C-G>l")
|
||||||
close!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for 'hkmap' and 'hkmapp'
|
" Test for 'hkmap' and 'hkmapp'
|
||||||
|
Loading…
Reference in New Issue
Block a user