diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 13:21:28 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 14:16:16 +0800 |
commit | 71acb7104344e3631e995b973416776aeadda0e1 (patch) | |
tree | 3f920c1fd2c6f0b08dd08997be266af69ee6f0c1 | |
parent | e05031097c8fff8aa71267035df3e724cf0c77e5 (diff) | |
download | rneovim-71acb7104344e3631e995b973416776aeadda0e1.tar.gz rneovim-71acb7104344e3631e995b973416776aeadda0e1.tar.bz2 rneovim-71acb7104344e3631e995b973416776aeadda0e1.zip |
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)
https://github.com/vim/vim/commit/b7a97ef340f03ca08df8c8e00cd5580f61aac824
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/functional/vimscript/state_spec.lua | 3 | ||||
-rw-r--r-- | test/old/testdir/test_functions.vim | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/vimscript/state_spec.lua b/test/functional/vimscript/state_spec.lua index dcff3c8d7e..fd38a8ad5b 100644 --- a/test/functional/vimscript/state_spec.lua +++ b/test/functional/vimscript/state_spec.lua @@ -29,6 +29,7 @@ describe('state() function', function() exec([[ call setline(1, ['one', 'two', 'three']) map ;; gg + set complete=. func RunTimer() call timer_start(0, {id -> v:lua.Get_state_mode()}) endfunc @@ -51,7 +52,7 @@ describe('state() function', function() eq({ 'mS', 'n' }, exec_lua('return _G.res')) -- 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 feed('<Esc>') eq({ 'aSc', 'i' }, exec_lua('return _G.res')) diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 759cde7d5a..5981b5214b 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -2571,6 +2571,7 @@ func Test_state() let lines =<< trim END call setline(1, ['one', 'two', 'three']) map ;; gg + set complete=. func RunTimer() call timer_start(10, {id -> execute('let g:state = state()') .. execute('let g:mode = mode()')}) endfunc @@ -2598,9 +2599,9 @@ func Test_state() call term_sendkeys(buf, getstate) 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_wait(buf, 50) + call term_wait(buf, 200) call term_sendkeys(buf, "\<Esc>") call term_sendkeys(buf, getstate) call WaitForAssert({-> assert_match('state: aSc; mode: i', term_getline(buf, 6))}, 1000) |