diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2022-07-10 01:04:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-10 01:04:11 +0200 |
commit | eb9155e557be6eb2ef0d2c7a09a76ccb4a803f21 (patch) | |
tree | 6f7dcea0088c763f4fd543d607fa9c34703795e5 /test/functional/core/startup_spec.lua | |
parent | 880de9a489be57d07416d1de9f869d4cba1e490c (diff) | |
parent | 797007997ce7b93b2e094c543a05cf325de1b513 (diff) | |
download | rneovim-eb9155e557be6eb2ef0d2c7a09a76ccb4a803f21.tar.gz rneovim-eb9155e557be6eb2ef0d2c7a09a76ccb4a803f21.tar.bz2 rneovim-eb9155e557be6eb2ef0d2c7a09a76ccb4a803f21.zip |
Merge #19267 require() in --startuptime
Diffstat (limited to 'test/functional/core/startup_spec.lua')
-rw-r--r-- | test/functional/core/startup_spec.lua | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index fc9ea72ff2..31aa873aa6 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local Screen = require('test.functional.ui.screen') local assert_alive = helpers.assert_alive +local assert_log = helpers.assert_log local clear = helpers.clear local command = helpers.command local ok = helpers.ok @@ -24,6 +25,28 @@ local startswith = helpers.startswith local write_file = helpers.write_file local meths = helpers.meths +local testfile = 'Xtest_startuptime' +after_each(function() + os.remove(testfile) +end) + +describe('startup', function() + it('--clean', function() + clear() + ok(string.find(meths.get_option('runtimepath'), funcs.stdpath('config'), 1, true) ~= nil) + clear('--clean') + ok(string.find(meths.get_option('runtimepath'), funcs.stdpath('config'), 1, true) == nil) + end) + + it('--startuptime', function() + clear({ args = {'--startuptime', testfile}}) + retry(nil, 1000, function() + assert_log('sourcing', testfile, 100) + assert_log("require%('vim%._editor'%)", testfile, 100) + end) + end) +end) + describe('startup', function() before_each(function() clear() @@ -520,13 +543,6 @@ describe('sysinit', function() end) end) -describe('clean', function() - clear() - ok(string.find(meths.get_option('runtimepath'), funcs.stdpath('config'), 1, true) ~= nil) - clear('--clean') - ok(string.find(meths.get_option('runtimepath'), funcs.stdpath('config'), 1, true) == nil) -end) - describe('user config init', function() local xhome = 'Xhome' local pathsep = helpers.get_pathsep() |