neovim/test/functional/legacy/cpoptions_spec.lua
zeertzjq 1037ce2e46 test: avoid repeated screen lines in expected states
This is the command invoked repeatedly to make the changes:

    :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
2023-12-09 22:15:02 +08:00

29 lines
750 B
Lua

local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear = helpers.clear
local command = helpers.command
local feed = helpers.feed
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 |
~ |*4
-- INSERT -- |
]])
feed('vim<Esc>')
screen:expect([[
vi^m three |
~ |*4
|
]])
end)
end)