neovim

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

021_control_wi_spec.lua (993B)


      1 -- Tests for [ CTRL-I with a count and CTRL-W CTRL-I with a count
      2 
      3 local n = require('test.functional.testnvim')()
      4 
      5 local clear, feed, insert = n.clear, n.feed, n.insert
      6 local feed_command, expect = n.feed_command, n.expect
      7 
      8 describe('CTRL-W CTRL-I', function()
      9  setup(clear)
     10 
     11  it('is working', function()
     12    insert([[
     13      #include test21.in
     14 
     15      /* test text test tex start here
     16      some text
     17      test text
     18      start OK if found this line
     19      start found wrong line
     20      test text]])
     21 
     22    -- Search for the second occurrence of start and append to register
     23    feed_command('/start')
     24    feed('2[<C-i>')
     25    feed_command('yank A')
     26 
     27    -- Same as above but using different keystrokes.
     28    feed('?start<cr>')
     29    feed('2<C-w><Tab>')
     30    feed_command('yank A')
     31 
     32    -- Clean buffer and put register
     33    feed('ggdG"ap')
     34    feed_command('1d')
     35 
     36    -- The buffer should now contain:
     37    expect([[
     38      start OK if found this line
     39      start OK if found this line]])
     40  end)
     41 end)