diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-06-13 00:52:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-13 00:52:30 +0200 |
commit | 9c7132cda4cf35156397935ac00d1127f8920cdf (patch) | |
tree | 61801c2046b48a04562db93e7b19721134edabfd /test | |
parent | 12d8ff7ccdad4d5873347e8d318a47ac552941d7 (diff) | |
parent | cdbc733ec4302c6cc4269c99b725b32595a01c20 (diff) | |
download | rneovim-9c7132cda4cf35156397935ac00d1127f8920cdf.tar.gz rneovim-9c7132cda4cf35156397935ac00d1127f8920cdf.tar.bz2 rneovim-9c7132cda4cf35156397935ac00d1127f8920cdf.zip |
Merge pull request #14788 from shadmansaleh/fix/lua_runtime1
fixup(runtime): Fix lua runtime files not listed in :scriptnames
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/core/startup_spec.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 30c0758446..658dfbda60 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -526,12 +526,25 @@ describe('runtime:', function() local plugin_folder_path = table.concat({plugin_path, 'plugin'}, pathsep) local plugin_file_path = table.concat({plugin_folder_path, 'plugin.lua'}, pathsep) + local profiler_file = 'test_startuptime.log' + mkdir_p(plugin_folder_path) write_file(plugin_file_path, [[vim.g.lua_plugin = 2]]) - clear{ args_rm={'-u'}, env={ XDG_CONFIG_HOME=xconfig }} + clear{ args_rm={'-u'}, args={'--startuptime', profiler_file}, env={ XDG_CONFIG_HOME=xconfig }} eq(2, eval('g:lua_plugin')) + -- Check if plugin_file_path is listed in :scriptname + local scripts = meths.exec(':scriptnames', true) + assert.Truthy(scripts:find(plugin_file_path)) + + -- Check if plugin_file_path is listed in startup profile + local profile_reader = io.open(profiler_file, 'r') + local profile_log = profile_reader:read('*a') + profile_reader:close() + assert.Truthy(profile_log :find(plugin_file_path)) + + os.remove(profiler_file) rmdir(plugin_path) end) |