mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 21:25:04 -07:00
052498ed42
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
45 lines
1.3 KiB
Lua
45 lines
1.3 KiB
Lua
-- Normal mode tests.
|
|
|
|
local t = require('test.testutil')
|
|
local n = require('test.functional.testnvim')()
|
|
local Screen = require('test.functional.ui.screen')
|
|
|
|
local clear = n.clear
|
|
local feed = n.feed
|
|
local fn = n.fn
|
|
local command = n.command
|
|
local eq = t.eq
|
|
|
|
describe('Normal mode', function()
|
|
before_each(clear)
|
|
|
|
it('setting &winhighlight or &winblend does not change curswant #27470', function()
|
|
fn.setline(1, { 'long long lone line', 'short line' })
|
|
feed('ggfi')
|
|
local pos = fn.getcurpos()
|
|
feed('j')
|
|
command('setlocal winblend=10 winhighlight=Visual:Search')
|
|
feed('k')
|
|
eq(pos, fn.getcurpos())
|
|
end)
|
|
|
|
it('&showcmd does not crash with :startinsert #28419', function()
|
|
local screen = Screen.new(60, 17)
|
|
screen:attach()
|
|
fn.termopen(
|
|
{ n.nvim_prog, '--clean', '--cmd', 'startinsert' },
|
|
{ env = { VIMRUNTIME = os.getenv('VIMRUNTIME') } }
|
|
)
|
|
screen:expect({
|
|
grid = [[
|
|
^ |
|
|
~ |*13
|
|
[No Name] 0,1 All|
|
|
-- INSERT -- |
|
|
|
|
|
]],
|
|
attr_ids = {},
|
|
})
|
|
end)
|
|
end)
|