robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
811 B30 linesraw
1local n = require('test.functional.testnvim')()
2local t = require('test.testutil')
3local Screen = require('test.functional.ui.screen')
4
5local describe, it, before_each = t.describe, t.it, t.before_each
6local clear = n.clear
7local command = n.command
8local feed = n.feed
9
10before_each(clear)
11
12describe('cpoptions', function()
13  it('$', function()
14    local screen = Screen.new(30, 6)
15    command('set cpo+=$')
16    command([[call setline(1, 'one two three')]])
17    feed('c2w')
18    screen:expect([[
19      ^one tw$ three                 |
20      {1:~                             }|*4
21      {5:-- INSERT --}                  |
22    ]])
23    feed('vim<Esc>')
24    screen:expect([[
25      vi^m three                     |
26      {1:~                             }|*4
27                                    |
28    ]])
29  end)
30end)