aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/runtime_spec.lua
diff options
context:
space:
mode:
authorshadmansaleh <shadmansaleh3@gmail.com>2021-06-02 16:33:40 +0600
committershadmansaleh <shadmansaleh3@gmail.com>2021-06-11 01:01:02 +0600
commit4dffe1ff2f284fbd4d2bdb6a0f3997e21f9c0c6c (patch)
treeda4c4b48ce7aa9b10b980dfc4d542c0a4c21399b /test/functional/lua/runtime_spec.lua
parentfd5e5d2715d264447d94d7253f3c78bd7003a472 (diff)
downloadrneovim-4dffe1ff2f284fbd4d2bdb6a0f3997e21f9c0c6c.tar.gz
rneovim-4dffe1ff2f284fbd4d2bdb6a0f3997e21f9c0c6c.tar.bz2
rneovim-4dffe1ff2f284fbd4d2bdb6a0f3997e21f9c0c6c.zip
feat(runtime): Allow lua to be used in indent
Diffstat (limited to 'test/functional/lua/runtime_spec.lua')
-rw-r--r--test/functional/lua/runtime_spec.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/lua/runtime_spec.lua b/test/functional/lua/runtime_spec.lua
index b55141f427..cd554d6bea 100644
--- a/test/functional/lua/runtime_spec.lua
+++ b/test/functional/lua/runtime_spec.lua
@@ -136,5 +136,24 @@ describe('runtime:', function()
rmdir(ftplugin_folder)
end)
end)
+
+ describe('indent', function()
+ local indent_folder = table.concat({xconfig, 'nvim', 'indent'}, pathsep)
+
+ before_each(clear)
+
+ it('loads lua indents', function()
+ local indent_file = table.concat({indent_folder , 'new-ft.lua'}, pathsep)
+ mkdir_p(indent_folder)
+ write_file(indent_file , [[ vim.g.lua_indent = 1 ]])
+
+ clear{ args_rm={'-u' }, env={ XDG_CONFIG_HOME=xconfig, VIMRUNTIME='runtime/' }}
+
+ exec [[set filetype=new-ft]]
+ eq(1, eval('g:lua_indent'))
+ rmdir(indent_folder)
+ end)
+ end)
+
end)