robin/laufey

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

Justin M. KeyesMerge #40865 from justinmk/fixcif907614088

master
862 B43 linesraw
1-- Test for t movement command and 'cpo-;' setting
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('coptions', function()
11  setup(clear)
12
13  -- luacheck: ignore 613 (Trailing whitespace in a string)
14  it('is working', function()
15    insert([[
16      aaa two three four
17          zzz
18      yyy   
19      bbb yee yoo four
20      ccc two three four
21      ddd yee yoo four]])
22
23    feed_command('set cpo-=;')
24
25    feed('gg0tt;D')
26    feed('j0fz;D')
27    feed('j$Fy;D')
28    feed('j$Ty;D')
29
30    feed_command('set cpo+=;')
31
32    feed('j0tt;;D')
33    feed('j$Ty;;D')
34
35    expect([[
36      aaa two
37          z
38      y
39      bbb y
40      ccc
41      ddd yee y]])
42  end)
43end)