mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00

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.
25 lines
658 B
Lua
25 lines
658 B
Lua
-- Tests for signs
|
|
|
|
local n = require('test.functional.testnvim')()
|
|
|
|
local clear, command, expect = n.clear, n.command, n.expect
|
|
|
|
describe('signs', function()
|
|
setup(clear)
|
|
|
|
it('is working', function()
|
|
command('sign define JumpSign text=x')
|
|
command([[exe 'sign place 42 line=2 name=JumpSign buffer=' . bufnr('')]])
|
|
-- Split the window to the bottom to verify :sign-jump will stay in the current
|
|
-- window if the buffer is displayed there.
|
|
command('bot split')
|
|
command([[exe 'sign jump 42 buffer=' . bufnr('')]])
|
|
command([[call append(line('$'), winnr())]])
|
|
|
|
-- Assert buffer contents.
|
|
expect([[
|
|
|
|
2]])
|
|
end)
|
|
end)
|