2014-10-22 15:25:40 -07:00
|
|
|
-- Tests for not doing smart indenting when it isn't set.
|
|
|
|
|
2016-04-23 16:53:11 -07:00
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
2017-04-08 12:02:44 -07:00
|
|
|
|
|
|
|
local feed = helpers.feed
|
|
|
|
local clear = helpers.clear
|
|
|
|
local insert = helpers.insert
|
|
|
|
local expect = helpers.expect
|
|
|
|
local feed_command = helpers.feed_command
|
2014-10-22 15:25:40 -07:00
|
|
|
|
|
|
|
describe('unset smart indenting', function()
|
2017-04-08 12:02:44 -07:00
|
|
|
before_each(clear)
|
2014-10-22 15:25:40 -07:00
|
|
|
|
|
|
|
it('is working', function()
|
|
|
|
insert([[
|
|
|
|
start text
|
|
|
|
some test text
|
|
|
|
test text
|
|
|
|
test text
|
|
|
|
test text]])
|
|
|
|
|
2017-04-08 12:02:44 -07:00
|
|
|
feed_command('set nocin nosi ai')
|
|
|
|
feed_command('/some')
|
2014-10-22 15:25:40 -07:00
|
|
|
feed('2cc#test<Esc>')
|
|
|
|
|
|
|
|
expect([[
|
|
|
|
start text
|
|
|
|
#test
|
|
|
|
test text
|
|
|
|
test text]])
|
|
|
|
end)
|
|
|
|
end)
|