Re-fix autoindent with tests

This commit is contained in:
hrsh7th
2021-11-08 22:16:58 +09:00
parent 313773584d
commit 2fca457453
2 changed files with 11 additions and 2 deletions

View File

@@ -13,4 +13,13 @@ describe('feedkeys', function()
end)
assert.are.equal(reg, keymap.t('aiueo'))
end)
it('autoindent', function()
vim.cmd([[set indentkeys+==end]])
feedkeys.call(keymap.t('iif<CR><Tab>end') .. keymap.autoindent(), 'nx')
assert.are.same(vim.api.nvim_buf_get_lines(0, 0, -1, false), {
'if',
'end'
})
end)
end)