mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
vim-patch:8.1.2099: state() test fails on some Mac systems
Problem: state() test fails on some Mac systems.
Solution: Increase the wait time. (closes vim/vim#4983)
b7a97ef340
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -29,6 +29,7 @@ describe('state() function', function()
|
|||||||
exec([[
|
exec([[
|
||||||
call setline(1, ['one', 'two', 'three'])
|
call setline(1, ['one', 'two', 'three'])
|
||||||
map ;; gg
|
map ;; gg
|
||||||
|
set complete=.
|
||||||
func RunTimer()
|
func RunTimer()
|
||||||
call timer_start(0, {id -> v:lua.Get_state_mode()})
|
call timer_start(0, {id -> v:lua.Get_state_mode()})
|
||||||
endfunc
|
endfunc
|
||||||
@@ -51,7 +52,7 @@ describe('state() function', function()
|
|||||||
eq({ 'mS', 'n' }, exec_lua('return _G.res'))
|
eq({ 'mS', 'n' }, exec_lua('return _G.res'))
|
||||||
|
|
||||||
-- Insert mode completion
|
-- Insert mode completion
|
||||||
feed([[:call RunTimer()<CR>Got<C-X><C-N>]])
|
feed([[:call RunTimer()<CR>Got<C-N>]])
|
||||||
poke_eventloop() -- Allow polling for events
|
poke_eventloop() -- Allow polling for events
|
||||||
feed('<Esc>')
|
feed('<Esc>')
|
||||||
eq({ 'aSc', 'i' }, exec_lua('return _G.res'))
|
eq({ 'aSc', 'i' }, exec_lua('return _G.res'))
|
||||||
|
|||||||
@@ -2571,6 +2571,7 @@ func Test_state()
|
|||||||
let lines =<< trim END
|
let lines =<< trim END
|
||||||
call setline(1, ['one', 'two', 'three'])
|
call setline(1, ['one', 'two', 'three'])
|
||||||
map ;; gg
|
map ;; gg
|
||||||
|
set complete=.
|
||||||
func RunTimer()
|
func RunTimer()
|
||||||
call timer_start(10, {id -> execute('let g:state = state()') .. execute('let g:mode = mode()')})
|
call timer_start(10, {id -> execute('let g:state = state()') .. execute('let g:mode = mode()')})
|
||||||
endfunc
|
endfunc
|
||||||
@@ -2598,9 +2599,9 @@ func Test_state()
|
|||||||
call term_sendkeys(buf, getstate)
|
call term_sendkeys(buf, getstate)
|
||||||
call WaitForAssert({-> assert_match('state: mSc; mode: n', term_getline(buf, 6))}, 1000)
|
call WaitForAssert({-> assert_match('state: mSc; mode: n', term_getline(buf, 6))}, 1000)
|
||||||
|
|
||||||
" Insert mode completion
|
" Insert mode completion (bit slower on Mac)
|
||||||
call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>")
|
call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>")
|
||||||
call term_wait(buf, 50)
|
call term_wait(buf, 200)
|
||||||
call term_sendkeys(buf, "\<Esc>")
|
call term_sendkeys(buf, "\<Esc>")
|
||||||
call term_sendkeys(buf, getstate)
|
call term_sendkeys(buf, getstate)
|
||||||
call WaitForAssert({-> assert_match('state: aSc; mode: i', term_getline(buf, 6))}, 1000)
|
call WaitForAssert({-> assert_match('state: aSc; mode: i', term_getline(buf, 6))}, 1000)
|
||||||
|
|||||||
Reference in New Issue
Block a user