diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/autocmd/bufenter_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/autocmd/filetype_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/ex_cmds/help_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/helpers.lua | 5 | ||||
-rw-r--r-- | test/functional/provider/python3_spec.lua | 1 | ||||
-rw-r--r-- | test/functional/provider/ruby_spec.lua | 1 |
6 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/autocmd/bufenter_spec.lua b/test/functional/autocmd/bufenter_spec.lua index e14ddb3316..47f4adb0d6 100644 --- a/test/functional/autocmd/bufenter_spec.lua +++ b/test/functional/autocmd/bufenter_spec.lua @@ -33,9 +33,9 @@ describe('autocmd BufEnter', function() end) it('triggered by ":split normal|:help|:bw"', function() + helpers.add_builddir_to_rtp() command("split normal") command("wincmd j") - command("helptags runtime/doc") command("help") command("wincmd L") command("autocmd BufEnter normal let g:bufentered = 1") diff --git a/test/functional/autocmd/filetype_spec.lua b/test/functional/autocmd/filetype_spec.lua index e6fa7ab6bb..a571f6ee3b 100644 --- a/test/functional/autocmd/filetype_spec.lua +++ b/test/functional/autocmd/filetype_spec.lua @@ -8,6 +8,7 @@ describe('autocmd FileType', function() before_each(clear) it("is triggered by :help only once", function() + helpers.add_builddir_to_rtp() command("let g:foo = 0") command("autocmd FileType help let g:foo = g:foo + 1") command("help help") diff --git a/test/functional/ex_cmds/help_spec.lua b/test/functional/ex_cmds/help_spec.lua index 66d7d7d89f..0ec7249218 100644 --- a/test/functional/ex_cmds/help_spec.lua +++ b/test/functional/ex_cmds/help_spec.lua @@ -9,6 +9,7 @@ describe(':help', function() before_each(clear) it('window closed makes cursor return to a valid win/buf #9773', function() + helpers.add_builddir_to_rtp() command('help help') eq(1001, funcs.win_getid()) command('quit') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index d040ff5f8c..2f76f24d84 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -800,6 +800,11 @@ function module.parse_context(ctx) end, parsed) end +function module.add_builddir_to_rtp() + -- Add runtime from build dir for doc/tags (used with :help). + module.command(string.format([[set rtp+=%s/runtime]], module.test_build_dir)) +end + module = global_helpers.tbl_extend('error', module, global_helpers) return function(after_each) diff --git a/test/functional/provider/python3_spec.lua b/test/functional/provider/python3_spec.lua index a3c6c57a73..f4b1b0e4dc 100644 --- a/test/functional/provider/python3_spec.lua +++ b/test/functional/provider/python3_spec.lua @@ -97,6 +97,7 @@ describe('python3 provider', function() end) it('RPC call to expand("<afile>") during BufDelete #5245 #5617', function() + helpers.add_builddir_to_rtp() source([=[ python3 << EOF import vim diff --git a/test/functional/provider/ruby_spec.lua b/test/functional/provider/ruby_spec.lua index 62ac91a929..72802db3c9 100644 --- a/test/functional/provider/ruby_spec.lua +++ b/test/functional/provider/ruby_spec.lua @@ -101,6 +101,7 @@ end) describe('ruby provider', function() it('RPC call to expand("<afile>") during BufDelete #5245 #5617', function() + helpers.add_builddir_to_rtp() command([=[autocmd BufDelete * ruby VIM::evaluate('expand("<afile>")')]=]) feed_command('help help') eq(2, eval('1+1')) -- Still alive? |