neovim/test/functional/legacy/081_coptions_movement_spec.lua

41 lines
817 B
Lua
Raw Normal View History

2014-10-22 17:24:29 -07:00
-- Test for t movement command and 'cpo-;' setting
local helpers = require('test.functional.helpers')(after_each)
2014-10-22 17:24:29 -07:00
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
local feed_command, expect = helpers.feed_command, helpers.expect
2014-10-22 17:24:29 -07:00
describe('coptions', function()
setup(clear)
-- luacheck: ignore 613 (Trailing whitespace in a string)
2014-10-22 17:24:29 -07:00
it('is working', function()
insert([[
aaa two three four
zzz
yyy
bbb yee yoo four
ccc two three four
ddd yee yoo four]])
feed_command('set cpo-=;')
2014-10-22 17:24:29 -07:00
feed('gg0tt;D')
feed('j0fz;D')
feed('j$Fy;D')
feed('j$Ty;D')
feed_command('set cpo+=;')
2014-10-22 17:24:29 -07:00
feed('j0tt;;D')
feed('j$Ty;;D')
2014-10-22 17:24:29 -07:00
expect([[
aaa two
z
y
bbb y
ccc
ddd yee y]])
end)
end)