aboutsummaryrefslogtreecommitdiff
path: root/test/functional/editor/K_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/editor/K_spec.lua')
-rw-r--r--test/functional/editor/K_spec.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/functional/editor/K_spec.lua b/test/functional/editor/K_spec.lua
index 1fbdd1c142..3c58892731 100644
--- a/test/functional/editor/K_spec.lua
+++ b/test/functional/editor/K_spec.lua
@@ -1,6 +1,7 @@
-local helpers = require('test.functional.helpers')(after_each)
-local eq, clear, eval, feed, api, retry =
- helpers.eq, helpers.clear, helpers.eval, helpers.feed, helpers.api, helpers.retry
+local t = require('test.testutil')
+local n = require('test.functional.testnvim')()
+
+local eq, clear, eval, feed, api, retry = t.eq, n.clear, n.eval, n.feed, n.api, t.retry
describe('K', function()
local test_file = 'K_spec_out'
@@ -13,19 +14,19 @@ describe('K', function()
end)
it("invokes colon-prefixed 'keywordprg' as Vim command", function()
- helpers.source([[
+ n.source([[
let @a='fnord'
set keywordprg=:put]])
-- K on the text "a" resolves to `:put a`.
feed('ia<ESC>K')
- helpers.expect([[
+ n.expect([[
a
fnord]])
end)
it("invokes non-prefixed 'keywordprg' as shell command", function()
- helpers.source([[
+ n.source([[
let @a='fnord'
set keywordprg=echo\ fnord>>]])
@@ -43,7 +44,7 @@ describe('K', function()
end)
it("<esc> kills the buffer for a running 'keywordprg' command", function()
- helpers.source('set keywordprg=less')
+ n.source('set keywordprg=less')
eval('writefile(["hello", "world"], "' .. test_file .. '")')
feed('i' .. test_file .. '<esc>K')
eq('t', eval('mode()'))
@@ -57,7 +58,7 @@ describe('K', function()
local bufnr = eval('bufnr()')
feed('<esc>')
eq('n', eval('mode()'))
- helpers.neq(bufnr, eval('bufnr()'))
+ t.neq(bufnr, eval('bufnr()'))
end)
it('empty string falls back to :help #19298', function()