2024-04-09 12:26:16 +01:00
|
|
|
local t = require('test.functional.testutil')()
|
2022-07-15 10:11:41 +08:00
|
|
|
local Screen = require('test.functional.ui.screen')
|
2024-04-08 11:03:20 +02:00
|
|
|
local clear = t.clear
|
|
|
|
|
local command = t.command
|
|
|
|
|
local feed = t.feed
|
2022-07-15 10:11:41 +08: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 11:02:52 +01:00
|
|
|
{1:~ }|*4
|
|
|
|
|
{5:-- INSERT --} |
|
2022-07-15 10:11:41 +08:00
|
|
|
]])
|
|
|
|
|
feed('vim<Esc>')
|
|
|
|
|
screen:expect([[
|
|
|
|
|
vi^m three |
|
2024-03-22 11:02:52 +01:00
|
|
|
{1:~ }|*4
|
2022-07-15 10:11:41 +08:00
|
|
|
|
|
|
|
|
|
]])
|
|
|
|
|
end)
|
|
|
|
|
end)
|