neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

cpoptions_spec.lua (710B)


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