2014-10-22 15:25:40 -07:00
|
|
|
-- Tests for not doing smart indenting when it isn't set.
|
|
|
|
|
2024-04-20 08:44:13 -07:00
|
|
|
local n = require('test.functional.testnvim')()
|
2017-04-08 12:02:44 -07:00
|
|
|
|
2024-04-20 08:44:13 -07:00
|
|
|
local feed = n.feed
|
|
|
|
local clear = n.clear
|
|
|
|
local insert = n.insert
|
|
|
|
local expect = n.expect
|
|
|
|
local feed_command = n.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)
|