comparison src/testdir/test_functions.vim @ 18209:9a7bbad64376 v8.1.2099

patch 8.1.2099: state() test fails on some Mac systems Commit: https://github.com/vim/vim/commit/b7a97ef340f03ca08df8c8e00cd5580f61aac824 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 28 22:11:56 2019 +0200 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 https://github.com/vim/vim/issues/4983)
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Sep 2019 22:15:03 +0200
parents 2416e1a887ca
children 3089b422b9dc
comparison
equal deleted inserted replaced
18208:bc5f313b71ef 18209:9a7bbad64376
1665 CheckRunVimInTerminal 1665 CheckRunVimInTerminal
1666 1666
1667 let lines =<< trim END 1667 let lines =<< trim END
1668 call setline(1, ['one', 'two', 'three']) 1668 call setline(1, ['one', 'two', 'three'])
1669 map ;; gg 1669 map ;; gg
1670 set complete=.
1670 func RunTimer() 1671 func RunTimer()
1671 call timer_start(10, {id -> execute('let g:state = state()') .. execute('let g:mode = mode()')}) 1672 call timer_start(10, {id -> execute('let g:state = state()') .. execute('let g:mode = mode()')})
1672 endfunc 1673 endfunc
1673 au Filetype foobar let g:state = state()|let g:mode = mode() 1674 au Filetype foobar let g:state = state()|let g:mode = mode()
1674 END 1675 END
1692 call term_wait(buf, 50) 1693 call term_wait(buf, 50)
1693 call term_sendkeys(buf, ";") 1694 call term_sendkeys(buf, ";")
1694 call term_sendkeys(buf, getstate) 1695 call term_sendkeys(buf, getstate)
1695 call WaitForAssert({-> assert_match('state: mSc; mode: n', term_getline(buf, 6))}, 1000) 1696 call WaitForAssert({-> assert_match('state: mSc; mode: n', term_getline(buf, 6))}, 1000)
1696 1697
1697 " Insert mode completion 1698 " Insert mode completion (bit slower on Mac)
1698 call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>") 1699 call term_sendkeys(buf, ":call RunTimer()\<CR>Got\<C-N>")
1699 call term_wait(buf, 50) 1700 call term_wait(buf, 200)
1700 call term_sendkeys(buf, "\<Esc>") 1701 call term_sendkeys(buf, "\<Esc>")
1701 call term_sendkeys(buf, getstate) 1702 call term_sendkeys(buf, getstate)
1702 call WaitForAssert({-> assert_match('state: aSc; mode: i', term_getline(buf, 6))}, 1000) 1703 call WaitForAssert({-> assert_match('state: aSc; mode: i', term_getline(buf, 6))}, 1000)
1703 1704
1704 " Autocommand executing 1705 " Autocommand executing