robin/laufey

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

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
1.0 KiB51 linesraw
1-- Tests Blockwise Visual when there are TABs before the text.
2-- First test for undo working properly when executing commands from a register.
3-- Also test this in an empty buffer.
4
5local n = require('test.functional.testnvim')()
6local t = require('test.testutil')
7
8local describe, it, setup = t.describe, t.it, t.setup
9local clear, feed, insert = n.clear, n.feed, n.insert
10local feed_command, expect = n.feed_command, n.expect
11
12describe('blockwise visual', function()
13  setup(clear)
14
15  it('is working', function()
16    insert([[
17123456
18234567
19345678
20
21test text test tex start here
22		some text
23		test text
24test text
25
26x	jAy kdd
27Ox jAy kdd]])
28
29    feed(":let @a = 'Ox<C-v><Esc>jAy<C-v><Esc>kdd'<cr>")
30    feed('G0k@au')
31    feed_command('new')
32    feed('@auY')
33    feed_command('quit')
34    feed('GP')
35    feed_command('/start here')
36    feed('"by$<C-v>jjlld')
37    feed_command('/456')
38    feed('<C-v>jj"bP')
39    feed_command('$-3,$d')
40
41    expect([[
42123start here56
43234start here67
44345start here78
45
46test text test tex rt here
47		somext
48		tesext
49test text]])
50  end)
51end)