mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
vim-patch:8.2.2643: various code not covered by tests
Problem: Various code not covered by tests.
Solution: Add a few more test. (Yegappan Lakshmanan, closes vim/vim#7995)
1f448d906b
Cherry-pick some test_edit.vim changes from patches 8.2.{1022,1432}.
Reorder test_undo.vim to match upstream.
This commit is contained in:
26
test/functional/legacy/edit_spec.lua
Normal file
26
test/functional/legacy/edit_spec.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear = helpers.clear
|
||||
local command = helpers.command
|
||||
local expect = helpers.expect
|
||||
local feed = helpers.feed
|
||||
local sleep = helpers.sleep
|
||||
|
||||
before_each(clear)
|
||||
|
||||
-- oldtest: Test_autoindent_remove_indent()
|
||||
it('autoindent removes indent when Insert mode is stopped', function()
|
||||
command('set autoindent')
|
||||
-- leaving insert mode in a new line with indent added by autoindent, should
|
||||
-- remove the indent.
|
||||
feed('i<Tab>foo<CR><Esc>')
|
||||
-- Need to delay for sometime, otherwise the code in getchar.c will not be
|
||||
-- exercised.
|
||||
sleep(50)
|
||||
-- when a line is wrapped and the cursor is at the start of the second line,
|
||||
-- leaving insert mode, should move the cursor back to the first line.
|
||||
feed('o' .. ('x'):rep(20) .. '<Esc>')
|
||||
-- Need to delay for sometime, otherwise the code in getchar.c will not be
|
||||
-- exercised.
|
||||
sleep(50)
|
||||
expect('\tfoo\n\n' .. ('x'):rep(20))
|
||||
end)
|
Reference in New Issue
Block a user