aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua')
-rw-r--r--test/functional/lua/diagnostic_spec.lua3
-rw-r--r--test/functional/lua/version_spec.lua3
2 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/lua/diagnostic_spec.lua b/test/functional/lua/diagnostic_spec.lua
index 716c1e0f30..f648c0b215 100644
--- a/test/functional/lua/diagnostic_spec.lua
+++ b/test/functional/lua/diagnostic_spec.lua
@@ -8,6 +8,7 @@ local eq = helpers.eq
local matches = helpers.matches
local api = helpers.api
local pcall_err = helpers.pcall_err
+local fn = helpers.fn
describe('vim.diagnostic', function()
before_each(function()
@@ -109,7 +110,7 @@ describe('vim.diagnostic', function()
'DiagnosticVirtualTextOk',
'DiagnosticVirtualTextWarn',
'DiagnosticWarn',
- }, exec_lua([[return vim.fn.getcompletion('Diagnostic', 'highlight')]]))
+ }, fn.getcompletion('Diagnostic', 'highlight'))
end)
it('retrieves diagnostics from all buffers and namespaces', function()
diff --git a/test/functional/lua/version_spec.lua b/test/functional/lua/version_spec.lua
index 3bc9e26d41..9f953daa9e 100644
--- a/test/functional/lua/version_spec.lua
+++ b/test/functional/lua/version_spec.lua
@@ -5,6 +5,7 @@ local ok = helpers.ok
local exec_lua = helpers.exec_lua
local matches = helpers.matches
local pcall_err = helpers.pcall_err
+local fn = helpers.fn
local function v(ver)
return vim.version._version(ver)
@@ -17,7 +18,7 @@ describe('version', function()
end)
it('version() returns Nvim version', function()
- local expected = exec_lua('return vim.fn.api_info().version')
+ local expected = fn.api_info().version
local actual = exec_lua('return vim.version()')
eq(expected.major, actual.major)
eq(expected.minor, actual.minor)