2024-04-20 08:44:13 -07:00
|
|
|
local n = require('test.functional.testnvim')()
|
2022-07-14 19:11:41 -07:00
|
|
|
local Screen = require('test.functional.ui.screen')
|
2024-04-20 08:44:13 -07:00
|
|
|
|
|
|
|
local clear = n.clear
|
|
|
|
local command = n.command
|
|
|
|
local feed = n.feed
|
2022-07-14 19:11:41 -07:00
|
|
|
|
|
|
|
before_each(clear)
|
|
|
|
|
|
|
|
describe('cpoptions', function()
|
|
|
|
it('$', function()
|
|
|
|
local screen = Screen.new(30, 6)
|
|
|
|
screen:attach()
|
|
|
|
command('set cpo+=$')
|
|
|
|
command([[call setline(1, 'one two three')]])
|
|
|
|
feed('c2w')
|
|
|
|
screen:expect([[
|
|
|
|
^one tw$ three |
|
2024-03-22 03:02:52 -07:00
|
|
|
{1:~ }|*4
|
|
|
|
{5:-- INSERT --} |
|
2022-07-14 19:11:41 -07:00
|
|
|
]])
|
|
|
|
feed('vim<Esc>')
|
|
|
|
screen:expect([[
|
|
|
|
vi^m three |
|
2024-03-22 03:02:52 -07:00
|
|
|
{1:~ }|*4
|
2022-07-14 19:11:41 -07:00
|
|
|
|
|
|
|
|
]])
|
|
|
|
end)
|
|
|
|
end)
|