mirror of
https://github.com/neovim/neovim.git
synced 2026-05-04 21:15:09 +00:00
functests: Replace execute with either command or feed_command
Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
This commit is contained in:
@@ -2,31 +2,31 @@
|
||||
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local feed = helpers.feed
|
||||
local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect
|
||||
local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect
|
||||
|
||||
describe('Virtual replace mode', function()
|
||||
setup(clear)
|
||||
|
||||
it('is working', function()
|
||||
-- Make sure that backspace works, no matter what termcap is used.
|
||||
execute('set t_kD=x7f t_kb=x08')
|
||||
feed_command('set t_kD=x7f t_kb=x08')
|
||||
-- Use vi default for 'smarttab'
|
||||
execute('set nosmarttab')
|
||||
feed_command('set nosmarttab')
|
||||
feed('ggdGa<cr>')
|
||||
feed('abcdefghi<cr>')
|
||||
feed('jk<tab>lmn<cr>')
|
||||
feed('<Space><Space><Space><Space>opq<tab>rst<cr>')
|
||||
feed('<C-d>uvwxyz<cr>')
|
||||
feed('<esc>gg')
|
||||
execute('set ai')
|
||||
execute('set bs=2')
|
||||
feed_command('set ai')
|
||||
feed_command('set bs=2')
|
||||
feed('gR0<C-d> 1<cr>')
|
||||
feed('A<cr>')
|
||||
feed('BCDEFGHIJ<cr>')
|
||||
feed('<tab>KL<cr>')
|
||||
feed('MNO<cr>')
|
||||
feed('PQR<esc>G')
|
||||
execute('ka')
|
||||
feed_command('ka')
|
||||
feed('o0<C-d><cr>')
|
||||
feed('abcdefghi<cr>')
|
||||
feed('jk<tab>lmn<cr>')
|
||||
|
||||
Reference in New Issue
Block a user