robin/laufey

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

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

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