diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index b41f017298..6d35c83d49 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -1140,6 +1140,7 @@ describe('user config init', function() string.format( [[ vim.g.exrc_file = "%s" + vim.g.exrc_path = debug.getinfo(1, 'S').source:sub(2) ]], exrc_path ) @@ -1150,6 +1151,7 @@ describe('user config init', function() string.format( [[ let g:exrc_file = "%s" + " let g:exrc_path = ?? ]], exrc_path ) @@ -1213,6 +1215,12 @@ describe('user config init', function() )) clear { args_rm = { '-u' }, env = xstateenv } + if string.find(exrc_path, '%.lua$') then + eq( + vim.fs.normalize(vim.fs.abspath(filename)), + vim.fs.normalize(vim.fs.abspath(eval('g:exrc_path'))) + ) + end -- The 'exrc' file is now trusted. eq(filename, eval('g:exrc_file')) end)