aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/runtime_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/runtime_spec.lua')
-rw-r--r--test/functional/lua/runtime_spec.lua21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/functional/lua/runtime_spec.lua b/test/functional/lua/runtime_spec.lua
index cd554d6bea..7286e89c76 100644
--- a/test/functional/lua/runtime_spec.lua
+++ b/test/functional/lua/runtime_spec.lua
@@ -127,7 +127,7 @@ describe('runtime:', function()
it('loads lua ftplugins', function()
local ftplugin_file = table.concat({ftplugin_folder , 'new-ft.lua'}, pathsep)
mkdir_p(ftplugin_folder)
- write_file(ftplugin_file , [[ vim.g.lua_ftplugin = 1 ]])
+ write_file(ftplugin_file , [[vim.g.lua_ftplugin = 1]])
clear{ args_rm={'-u' }, env={ XDG_CONFIG_HOME=xconfig, VIMRUNTIME='runtime/' }}
@@ -145,7 +145,7 @@ describe('runtime:', function()
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 ]])
+ write_file(indent_file , [[vim.g.lua_indent = 1]])
clear{ args_rm={'-u' }, env={ XDG_CONFIG_HOME=xconfig, VIMRUNTIME='runtime/' }}
@@ -155,5 +155,22 @@ describe('runtime:', function()
end)
end)
+ describe('ftdetect', function()
+ local ftdetect_folder = table.concat({xconfig, 'nvim', 'ftdetect'}, pathsep)
+
+ before_each(clear)
+
+ it('loads lua ftdetects', function()
+ local ftdetect_file = table.concat({ftdetect_folder , 'new-ft.lua'}, pathsep)
+ mkdir_p(ftdetect_folder)
+ write_file(ftdetect_file , [[vim.g.lua_ftdetect = 1]])
+
+ clear{ args_rm={'-u' }, env={ XDG_CONFIG_HOME=xconfig, VIMRUNTIME='runtime/' }}
+
+ eq(1, eval('g:lua_ftdetect'))
+ rmdir(ftdetect_folder)
+ end)
+ end)
+
end)