diff options
author | shadmansaleh <shadmansaleh3@gmail.com> | 2021-05-31 17:35:13 +0600 |
---|---|---|
committer | shadmansaleh <shadmansaleh3@gmail.com> | 2021-06-11 00:58:38 +0600 |
commit | 687eb0b39f3bcad9566198b4c60bbd2755032991 (patch) | |
tree | d118e6d1adc4e9fdff845912e1606ab40ae8b454 /test/functional/legacy/packadd_spec.lua | |
parent | 1df8a34a7b91028413d6ac751b9dbf9fdcd6cda2 (diff) | |
download | rneovim-687eb0b39f3bcad9566198b4c60bbd2755032991.tar.gz rneovim-687eb0b39f3bcad9566198b4c60bbd2755032991.tar.bz2 rneovim-687eb0b39f3bcad9566198b4c60bbd2755032991.zip |
feat(startup): Source runtime/plugin/**/*.lua at startup
For opt plugins these files are sourced on `:packadd`
* `:runtime` Now can exexute lua files
Diffstat (limited to 'test/functional/legacy/packadd_spec.lua')
-rw-r--r-- | test/functional/legacy/packadd_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/legacy/packadd_spec.lua b/test/functional/legacy/packadd_spec.lua index 486a1fe471..48cd3ef9f8 100644 --- a/test/functional/legacy/packadd_spec.lua +++ b/test/functional/legacy/packadd_spec.lua @@ -101,9 +101,14 @@ describe('packadd', function() call setline(1, 'let g:plugin_works = 24') wq + exe 'split ' . plugdir . '/plugin/test.lua' + call setline(1, 'vim.g.plugin_lua_works = 24') + wq + packadd other call assert_equal(24, g:plugin_works) + call assert_equal(24, g:plugin_lua_works) call assert_true(len(&rtp) > len(rtp)) call assert_match(Escape(plugdir) . '\($\|,\)', &rtp) endfunc @@ -117,13 +122,18 @@ describe('packadd', function() exe 'split ' . s:plugdir . '/plugin/test.vim' call setline(1, 'let g:plugin_works = 42') wq + exe 'split ' . s:plugdir . '/plugin/test.lua' + call setline(1, 'let g:plugin_lua_works = 42') + wq let g:plugin_works = 0 + let g:plugin_lua_works = 0 packadd! mytest call assert_true(len(&rtp) > len(rtp)) call assert_match(Escape(s:plugdir) . '\($\|,\)', &rtp) call assert_equal(0, g:plugin_works) + call assert_equal(0, g:plugin_lua_works) " check the path is not added twice let new_rtp = &rtp |