diff options
author | Rom Grk <romgrk.cc@gmail.com> | 2020-11-03 03:11:08 -0500 |
---|---|---|
committer | Rom Grk <romgrk.cc@gmail.com> | 2020-11-03 03:11:08 -0500 |
commit | 13e0ca3e194a438383b8451e19090355aa6c29dc (patch) | |
tree | 0ac33ef5ac829b7c74dd15f34b17540c3186c356 /test/functional/core/startup_spec.lua | |
parent | c7c865214655f7d88fde85ed4947f07319c14182 (diff) | |
parent | 5b5848f2fb1f4b7995bb8a59d94b6766d2182070 (diff) | |
download | rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.tar.gz rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.tar.bz2 rneovim-13e0ca3e194a438383b8451e19090355aa6c29dc.zip |
Merge branch 'master' into add-scroll-events
Diffstat (limited to 'test/functional/core/startup_spec.lua')
-rw-r--r-- | test/functional/core/startup_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index 9b0668f9e6..3bfae5f3d7 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -7,6 +7,7 @@ local ok = helpers.ok local eq = helpers.eq local matches = helpers.matches local eval = helpers.eval +local exec_lua = helpers.exec_lua local feed = helpers.feed local funcs = helpers.funcs local mkdir = helpers.mkdir @@ -305,6 +306,27 @@ describe('startup', function() '+q' }) eq('[\'+q\'] 1', out) end) + + local function pack_clear(cmd) + clear('--cmd', 'set packpath=test/functional/fixtures', '--cmd', cmd) + end + + + it("handles &packpath during startup", function() + pack_clear [[ let g:x = bar#test() ]] + eq(-3, eval 'g:x') + + pack_clear [[ lua _G.y = require'bar'.doit() ]] + eq(9003, exec_lua [[ return _G.y ]]) + end) + + it("handles :packadd during startup", function() + pack_clear [[ packadd! bonus | let g:x = bonus#secret() ]] + eq('halloj', eval 'g:x') + + pack_clear [[ packadd! bonus | lua _G.y = require'bonus'.launch() ]] + eq('CPE 1704 TKS', exec_lua [[ return _G.y ]]) + end) end) describe('sysinit', function() |